nmakinen wrote:Correct me if I'm wrong, but I read 32 bit float and 24 bit integer both have exactly the same SNR.
This is something which I have also seen quoted very often. Like many 'scientific facts' it is often used without any consideration of how the ''real world" differs from the 'idealised' theory.
It is approximately true if you have two signals that are fully modulating the numbers (i.e. -1 to +1 in SM streams).
But if a signal is scaled down, a float can have a reduced exponent and still retain 23 bits of precision in the mantissa - whereas an integer simply loses precision as fewer and fewer of the more significant bits are modulated.
Since SNR is based on ratios, this makes it clear that the SNR of a scaled down integer will increase (the +/-0.5LSB rounding errors are now larger relative to the desired signal). OTOH, the float SNR is barely affected by scaling, as the rounding errors scale along with the desired signal.
This is very important when it comes to summing many small signals (e.g. a mixing desk) - as the errors will accumulate at this stage, leaving the integer version with total 'error noise' that might occupy much more than just the LSB.
As scaling, splitting and summing signals is such a crucial part of DSP, this enhanced precision when using less than full-scale signals gives floats the advantage over integers.
Of course, it is way more complex than that in reality - but the general principle works well for any well designed float algorithm. Even with float signals, different algorithms can have a bias towards magnifying rounding errors, or cancelling them out . For example, a good algorithm will try to order the maths such that each operation takes two operands with closely matched exponents.
The moral of the tale is that SNR really only makes sense in the context of a complete system - once you start using DSP to actually do something with the data, the theoretical case of full-scale signals no longer applies. And we haven't even included the unavoidable noise from the analogue systems at the soundcard output, which is usually much greater than the theoretical +/- 0.5LSB quantising errors...
Matching the dynamic range of floats can certainly be done with integer (or fixed point) numbers, so long as enough bits are used - and yes, there would be greater precision; at least for signals that modulated more than just the lowest 23bits. (of course, double-precision floats would require a ridiculous number of bits for equivalent DR).
But just adding more bits creates massive problems for hardware design, memory usage, and for shifting data around quickly - which is the very reason that floats took over from fixed-point maths pretty early on in PC development.