On 16/10/2026 23:19, Charlie Gibbs wrote:
> IMHO one of the biggest programming mistakes is using floating
> point when you can do it faster, more accurately, and more
> easily with integers. That's not to say that there aren't
> places where floating point is necessary - but for some of
> us, that's a small portion of what we have to do. I don't
> need floating point to express IP addresses, for instance.
You may think that, but the potential for errors is huge.
Audio encoding is typically 16 bit integer, but if you are doing serious processing there will be many adds subtracts and multiplies. Its way easier to do all that in FP and then round up to the nearest integer for the final output, than to constantly have to rescae to maintain acceptable precision
--
Outside of a dog, a book is a man's best friend. Inside of a dog it's too dark to read.
Groucho Marx