# The "float/fixed" debate and more digital myths

For everything after the recording stage: hardware/software and how you use it.

### Re: The "float/fixed" debate and more digital myths

I stand corrected, I'm well out of date :thumbup:

Rich Hanson
Frequent Poster
Posts: 1582
Joined: Sat Sep 06, 2003 12:00 am
Location: UK

### Re: The "float/fixed" debate and more digital myths

Rich Hanson wrote:I stand corrected, I'm well out of date :thumbup:
I have to be corrected so often that I find it more comfortable to sit :lol:

Folderol
Jedi Poster
Posts: 9513
Joined: Sat Nov 15, 2008 1:00 am
Location: The Mudway Towns, UK
Yes. I am that Linux nut.
Onwards and... err... sideways!

### Re: The "float/fixed" debate and more digital myths

@Rich Thanks for your input. This is how myths get busted!

The idea that 32 bit float contains unaltered 24 bit audio data scaled by an eight bit exponent is ... a myth. I don't know where this originated but it's all around the internet -- I've never seen it explained any other way.

It may have been put together to reassure neurotic musicians who want to dither 24 bit audio ... twice.

What I said above about an exponent of 2^0 = 1 is wrong. With an exponent of 1 the numbers that can be represented are +1 to +2 and -1 to -2. That isn't a lot of use for audio.

The two's complement integers must be converted to a float between -1 and +1.

As far as I can see this doesn't introduce errors. Take 1 as an integer. To convert it to a float between 0 and 1 you would divide by 2^23 and that can be done exactly in a float with an exponent 0f 2^-23.

1 > 1/(2^23) = 2^-23
2 > 2/(2^23) = 1/(2^22) = 2^-22
3 > 3/(2^23) (also exact)
4 > 4/(2^23) = 2^-21

... and so on. This means the exponent is being used all the time.

The principle that no information is being lost or gained holds, but the details are more involved than the myth suggests.
merlyn
Poster
Posts: 49
Joined: Thu Nov 07, 2019 3:15 am

### Re: The "float/fixed" debate and more digital myths

merlyn wrote:...the details are more involved than the myth suggests.

Isn't that always the way? :D :ugeek:

Hugh Robjohns
Moderator
Posts: 25453
Joined: Fri Jul 25, 2003 12:00 am
Location: Worcestershire, UK
Technical Editor, Sound On Sound

### Re: The "float/fixed" debate and more digital myths

merlyn wrote:The idea that 32 bit float contains unaltered 24 bit audio data scaled by an eight bit exponent is ... a myth.

I'm not sure if you were referring to me or not, but I'll say if it wasn't clear is that I didn't think that was the case. When I say that 32-floating audio format contains 24-bit audio data, it doesn't mean I think it's a naive mapping of 24-bits of fixed point stuck in the lower bits of the floating point number - but I can see that it can be interpreted (incorrectly) as that's what's going on.

One thing I do say is that float numbers are "mathsy" and not at all intuitive to "regular" folk compared to fixed point files which are reasonably straighforward, and the times when I've looked into it just makes me realise that the full details are over rather over my head and I have needed to get into it deeply enough for a complete understanding. I understand just enough of it to be useful (and not *too* dangerous!) ;)

merlyn wrote:I don't know where this originated but it's all around the internet -- I've never seen it explained any other way.

Indeed. Like many things about digital audio, often they are explained by people who don't know the full details, because the full details have complexities that are problematic to explain to us more naive folk.

merlyn wrote:The two's complement integers must be converted to a float between -1 and +1.

Indeed.

merlyn wrote:The principle that no information is being lost or gained holds, but the details are more involved than the myth suggests.

Yes.

Also, I vaguely recall (but don't have the full details offhand) something about the floating range when you get high up is that the resolution isn't quite linear like integers - the gaps between numbers on the scale get bigger as you go. Maybe you can explain that to us laymen...

desmond
Jedi Poster
Posts: 9045
Joined: Tue Jan 10, 2006 1:00 am
mu:zines | music magazine archive | difficultAudio

### Re: The "float/fixed" debate and more digital myths

Most users don't realise that digital audio typically uses of two's complement binary, or the fundamental reasons for that, and will probably never grasp the important subtleties of IEEE floating point formats...

And most explanations are (over) simplified to try and get a concept across, rather than the detail... which is absolutely fine in my book. Most people aren't interested in, and don't need the technical detail, and the few who are interested will be quite capable of moving beyond the simplified analogies.

H

Hugh Robjohns
Moderator
Posts: 25453
Joined: Fri Jul 25, 2003 12:00 am
Location: Worcestershire, UK
Technical Editor, Sound On Sound

### Re: The "float/fixed" debate and more digital myths

Back in the dim and distant past (i.e. pre IEEE standardisation) there was a floating point format that was effectively a 2's complement with an exponent, so that's probably where the myth originated. My experience was on an old GEC minicomputer with 14 bit word length, so that gives you some idea of how long ago :bouncy: (Needless to say that in 14 bits, the accuracy was less than stellar, we tended to use our own fixed point libraries instead)

Anyway, back to the subject in hand!

Rich Hanson
Frequent Poster
Posts: 1582
Joined: Sat Sep 06, 2003 12:00 am
Location: UK

### Re: The "float/fixed" debate and more digital myths

desmond wrote:Also, I vaguely recall (but don't have the full details offhand) something about the floating range when you get high up is that the resolution isn't quite linear like integers - the gaps between numbers on the scale get bigger as you go. Maybe you can explain that to us laymen...

That's not so difficult to see, without even considering radix complements and IEEE 754. it's just a general consequence of the fact that the representation uses a nonlinear function and that you have only so many bits available to represent the function parameters (for a format say as "1.decimals x 10 power exponent" you will have a onlya given number of bits for "decimals" and for "exponent").

For fixed point representation (in the form "number dot decimals"), the "fixed number" of bits for "number" and "decimals" means that you have constant gaps between the real numbers that can be represented and numbers that cannot (and will be approximated, typically to the nearest lower representable number).

Say you allocate 2 bits for the decimals, you can represent only .0, .1, .2 and .3 as decimal parts, so that the real numbers 1.15 and 1.16 will end up both as,say 1.1 - the gap between the numbers you can represent will be a constant .1 . In other words, the mapping between reals and representation - so long there is one - is linear because the mapping function is linear.

With a representation that uses a power 10 function (or whatever nonlinear mapping), you still have the same "constant spacing" for the decimal part, but the multiplier will vary nonlinearly, leading to an nonlinear spacing between the representable numbers.

Say you use 2 bits for decimal part and 2 bits the exponent: you will have 0,1,2 and 3 as possible decimal parts (leading to 1.0, 1.1, 1.2 and 1.3 as left multiplier) and 1, 10, 100 and 1000 as possible right multipliers. Therefore, the numbers you can represent are therefore 1, 1.1, 1.2, 1.3, then 10, 11, 12, 13, then again 100, 110, 120, 130 and finally 1000, 1200, 1300, 1400. So the gaps between numbers that can be represented (or equivalently, the approximation error when you map real numbers) varies nonlinearly (and gets bigger for bigger numbers that you want to represent).

The same will happen with any representation using a nonlinear function, with the "gaps" between numbers varying according to the specific nonlinear function used.

CS70
Jedi Poster
Posts: 4640
Joined: Mon Nov 26, 2012 1:00 am
Location: Oslo, Norway
Silver Spoon - Check out our latest video and the FB page

### Re: The "float/fixed" debate and more digital myths

If I have a go at explaining that ...

23 bits is 8,388,608 different values. If the exponent is 2^0 = 1 there are 8,388,608 steps between 1 and 2. If the exponent is 2^1 = 2 there are the same number of steps but now these steps span the interval between 2 and 4. This is the same number of steps covering twice the range. If the exponent is 2^2 = 4 there are the same number of steps to cover the interval between 4 and 8. The distance between steps is getting bigger as the exponent goes up.

The exponent can go up to 2^127 = 170 141 183 460 469 231 731 687 303 715 884 105 728.

Those ~8 million steps don't seem like so many now :D
merlyn
Poster
Posts: 49
Joined: Thu Nov 07, 2019 3:15 am

### Re: The "float/fixed" debate and more digital myths

Yes indeed. By the way there is a nice blog here...

https://blogs.mathworks.com/cleve/2014/07/07/floating-point-numbers/

In some fields people are looking at using less bits to represent numbers than the standard 32/64 and also proposing other floating-pont representations with different distributions. Specialist hardware (GPUs) now support shorter number formats which means that multiple operations can run faster and also you get an advantage because it takes less memory and memory bandwidth to compute on numbers represented by less bits.

For audio (and I doubt we care anyway) it could even turn out that the distribution you note is actually a good thing as we use log scales as more relevant to hearing response in any case
wireman
Regular
Posts: 342
Joined: Fri Dec 17, 2004 1:00 am

### Re: The "float/fixed" debate and more digital myths

We never actually hear a 32 bit float. A to Ds and D to As are 24 bit.

This ties into your question earlier about what happens to a 32 bit float signal at +20dBFS. That can only happen inside a DAW.

Sampled data (24 bit) -> internal processing (32 bit float) -> reconstruction (24 bit)

By applying a gain of 20dB to a track the internal bus could have a level of +20dBFS but if you send that to the master bus with the master fader at 0dB it's going to be a distorted mess. The master fader would have to be at -20dB.

The master fader is dividing by a constant, in this case 10. It brings the 32 bit float back into the -1 to +1 range. Tracks can go over, but the master bus can't because it is outputting to 24 bit.
merlyn
Poster
Posts: 49
Joined: Thu Nov 07, 2019 3:15 am

### Re: The "float/fixed" debate and more digital myths

merlyn wrote:We never actually hear a 32 bit float. A to Ds and D to As are 24 bit.

That was the case... but we now have Zoom and Sound Devices promoting their 32-bit floating-point A-D converters in their premium portable recorders. So I suspect it won't be that long before we have other interface and preamp manufacturers offering and boasting about the same capability... not because it's really needed (in most conventional recording situations) but just because it's a bigger number that will please the marketing team. :crazy:

And D-As that directly accept 32-bit float via a USB connection can only be a trade show or two away, too... :beamup:

Hugh Robjohns
Moderator
Posts: 25453
Joined: Fri Jul 25, 2003 12:00 am
Location: Worcestershire, UK
Technical Editor, Sound On Sound

### Re: The "float/fixed" debate and more digital myths

It's interesting that you brought that up. It was the buzz around 32 bit float recording that led me to investigate.

This led to the patent for Sound Device's technology. It uses three 24 bit A to Ds in parallel :

There's a load of DSP involved to produce a 32 bit float.
merlyn
Poster
Posts: 49
Joined: Thu Nov 07, 2019 3:15 am

### Re: The "float/fixed" debate and more digital myths

They've dropped hints that their practical implementation involves more than three separate preamp and A-D paths, too. And yes, lots of number-crunching required to blend the various output data together sensibly! Seems to work very well, though...

H

Hugh Robjohns
Moderator
Posts: 25453
Joined: Fri Jul 25, 2003 12:00 am
Location: Worcestershire, UK
Technical Editor, Sound On Sound

### Re: The "float/fixed" debate and more digital myths

I think sanity will prevail and 32 bit float recording will remain a niche activity. For a field recorder it makes sense -- it can't clip.

But for a USB interface I can't see it taking off. The DSP must introduce latency. Early adopters would report that their 32 bit float interface was more expensive, sounds the same and has more latency. Hardly a glowing recommendation. :D

Of course we'll see and sanity has had a habit of not prevailing recently. :D
merlyn
Poster
Posts: 49
Joined: Thu Nov 07, 2019 3:15 am

### Re: The "float/fixed" debate and more digital myths

I was going to mention the ESS Sabre series of chips which directly output 32 bit floating point data until I did a bit of searching and realised that they no longer make a 32 bit ADC - only the DAC. I guess that this shows that the market is too small for a chip maker to build 32 bit ADC's.

http://www.esstech.com/index.php/en/pro ... onverters/

James Perrett
Moderator
Posts: 8682
Joined: Mon Sep 10, 2001 12:00 am
Location: The wilds of Hampshire
JRP Music - Audio Mastering and Restoration. JRP Music Facebook Page

### Re: The "float/fixed" debate and more digital myths

merlyn wrote: Early adopters would report that their 32 bit float interface was more expensive, sounds the same and has more latency. Hardly a glowing recommendation. :D
I fear that you underestimate the potential for confirmation bias, to the extent that I'd wager a not insignificant number of early adopters would report that their shiny and expensive new interfaces improved on <choice of nebulous adjectives like "openness", "space" etc.> and the slight latency penalty was a small price to pay ;)
Logarhythm
Frequent Poster
Posts: 830
Joined: Fri Mar 30, 2012 12:00 am
Location: On an intergalactic voyage to collect fresh electrons

### Re: The "float/fixed" debate and more digital myths

Thanks James.
ESS wrote:The SABRE32 Reference audio DAC’s 32-bit Hyperstreamä architecture can handle full 32-bit PCM data
That's a 32 bit integer chip. 32 bit integer would give a theoretical dynamic range of more than 180dB. This one claims a dynamic range of 135dB or roughly 22.5 bits.

The practical achievable dynamic range at the moment is around 120dB or 20 bits.

It's not possible to convert a 32 bit float to an analogue signal because say a value of 1.0 is 1 Volt, the voltage could get insanely high like 2^127 volts, which I don't think has ever existed on Earth. :D
merlyn
Poster
Posts: 49
Joined: Thu Nov 07, 2019 3:15 am

### Re: The "float/fixed" debate and more digital myths

@Logarhythm It's going to be interesting to see how this pans out :D
merlyn
Poster
Posts: 49
Joined: Thu Nov 07, 2019 3:15 am

### Re: The "float/fixed" debate and more digital myths

merlyn wrote:Thanks James.
ESS wrote:The SABRE32 Reference audio DAC’s 32-bit Hyperstreamä architecture can handle full 32-bit PCM data
That's a 32 bit integer chip. 32 bit integer would give a theoretical dynamic range of more than 180dB. This one claims a dynamic range of 135dB or roughly 22.5 bits.

You're right - for some reason I'd seen 32 bit floats mentioned in the same place as these ESS chips but it appears that the chips themselves are integer based. There seems little point in using the 32 bit feature in this case although I guess it may make later processing very slightly simpler as 24 bit integers aren't a standard data type in most programming languages.

James Perrett
Moderator
Posts: 8682
Joined: Mon Sep 10, 2001 12:00 am
Location: The wilds of Hampshire
JRP Music - Audio Mastering and Restoration. JRP Music Facebook Page

PreviousNext

### Who is online

Users browsing this forum: No registered users