SOS doesn't like the sound of floating point math?

Page: < 123 > Showing page 2 of 3
Author
Jim Roseberry
Max Output Level: 0 dBFS
  • Total Posts : 9871
  • Joined: 2004/03/23 11:34:51
  • Location: Ohio
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/05 15:17:28 (permalink)
The takeaway from this conversation, I think, is simple: leave yourself plenty of headroom at every step of the way.


This is obvious...
But I'd add that as resolution increases, rounding error becomes much less significant.
When we were working at 16Bit resolution, you can easily hear the affect of rounding error.
(The audio started sounding fuzzy/buzzy/etc)

With 64Bit Float, rounding error is extremely small.
Moving a mic a couple of inches will have a more profound overall affect.

Best Regards,

Jim Roseberry
jim@studiocat.com
www.studiocat.com
#31
Mr. Ease
Max Output Level: -71 dBFS
  • Total Posts : 960
  • Joined: 2003/11/24 18:44:01
  • Location: West Sussex, UK
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/05 15:20:01 (permalink)

ORIGINAL: bitflipper


That's why you want to avoid going over 0db, even though it's permissible in a floating-point system. Of course in an integer system like PT HD, it is simply not possible to exceed 0db - you just get a nasty-sounding digital over. This is why I always say that the main advantage of 32-bit float is that it's tolerant of sloppiness and forgiving to beginners. It really offers no other advantage over PT's 48-bit integer system.



I'm not disagreeing with the principles you're explaining but Pro Tools is actually 48 bit fixed point, not integer, maths which actually offers better precision than 32 bit floats - presumably why it was adopted. Naturally, 64 bit floats beat Pro Tools for precision but it is all really a non issue.
#32
rosabelle
Max Output Level: -85 dBFS
  • Total Posts : 261
  • Joined: 2007/09/24 17:00:26
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/05 15:33:17 (permalink)
Edit: See my posts a bit below. Ignore this one.

Bitflipper, you're my hero, but I think you're a bit off here, and I think it has to do with how we define resolution. For our audio purposes, I will define resolution in terms of significant figures and as a result, signal to noise ratio. Floating point numbers give you a constant significant figure resolution over a huge range. So if you measure my height in inches with a 32 bit float number, and the distance between the sun and the former planet Pluto in inches with the same floating point number, (as long as it doesn't overflow. I'm not going to try to figure the details ) the granularity will be significantly different between the two. But the precision or significant figured-ness of both measurements will be the same.
ORIGINAL: bitflipper
It's a quirk of the way floating-point numbers are stored digitally, wherein floating-point numbers offer a very wide range of possible values at the expense of precision.

Isn't it more a case of floats can represent a very wide range at a constant precision? In other words, they always use the same number of bits (precision) to represent the mantissa. With int numbers, the closer to 0 the numbers get, the fewer bits represent them. So with a float, the precision of numbers very close to 0 is the same precision as really magnitudinous numbers.

Consider that we're limited to the same 31 bits as an integer value (1 bit is the sign bit, so we really have only 31 bits to play with), and yet the float can represent a much larger number than the same 31-bit integer. How is this possible? It's because floats sacrifice accuracy for range. It's a fundamental flaw in the way computers do arithmetic.

As a float's value increases, we need to use more of those 31 bits to represent the whole number portion, and have fewer bits left over for the fractional part.

I don't think this is right. a 32 bit float always uses 23 bits for the mantissa, 1 bit for sign and 1 implicit bit, giving 25 bits of resolution. Then 8 bits for the exponent. No matter the magnitude of the number, those 25 bits are used to represent it. Ints on the other hand use less precision with small numbers. So if you take a loud signal in int format, turn it down really low, there are fewer bits to represent it. Then if you turn it up, you also turn up the imprecision. Do the same thing with a float and you don't lose any precision.

You might say that really huge numbers lose precision because you can't express every single really, really, huge integer that lies within the 32 bit floating point range with a 32 bit floating point number. But nonetheless, the resolution of those numbers are just the same as the resolution of the smaller numbers.

Usually, we can live with that because the fractional part becomes less and less important as the whole number part gets bigger. But if we make a big number small again as a result of some mathematical operation (e.g. lowering levels with a fader) we don't get those lost bits back and we're stuck with the lost accuracy.

Every time you go over 0db, you lose one bit of resolution, even if its only +0.01db over.

No, I really don't think so. You never lose resolution with floats. You will certainly get rounding errors, but those rounding errors will always be down at the 25th bit level.

And if you go over in more than one stage of the mixing/processing (e.g. the track is > 0db, then the sum on a bus goes > 0db, and the master bus is > 0db), the loss is cumulative.

That's why you want to avoid going over 0db, even though it's permissible in a floating-point system.

No, going over 0 dB in a float system is fine. Try it. Take 10 tracks of sines at -20 dBFS. Mix them all together and you get a sine at 0 dBFS. Now do the same thing, but add 48 dB of gain to each sine before mixing. Then drop the final mix level so you get the sine back to 0 dBFS. The resulting sine is just as precise as the other one. (or just as imprecise, depending on your view.) Conversely, try the same thing with huge amounts of turning down the signal, then mixing and turning it back up. No loss of precision with floats. (and I mean on the order of +/-100 dB or so. Not like +/-5000 dB)

Certain plugins might not like your signal going over 0 dBFS, but that's not a resolution issue.

Of course in an integer system like PT HD, it is simply not possible to exceed 0db - you just get a nasty-sounding digital over. This is why I always say that the main advantage of 32-bit float is that it's tolerant of sloppiness and forgiving to beginners. It really offers no other advantage over PT's 48-bit integer system.

When you jump up to 64 bits, this phenomenon can be ignored because the consequence of losing a bit is way too trivial to worry about.

Yeah, A 64 bit float engine with all 64 bit float processing is the way to go.
post edited by rosabelle - 2008/09/05 19:52:47
#33
dreamkeeper
Max Output Level: -54 dBFS
  • Total Posts : 2141
  • Joined: 2004/12/05 15:51:13
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/05 18:13:17 (permalink)
a 32 bit float always uses 23 bits for the mantissa, 1 bit for sign and 1 implicit bit, giving 25 bits of resolution. Then 8 bits for the exponent. No matter the magnitude of the number, those 25 bits are used to represent it.

I used to say that too on various occasions... But I just played around with this a bit (pun!), and now am confused (more than a bit ).

In 32bit audio, 0dBFS is usually represented by 1.0. The binary representation is 0-01111111-00000000000000000000000, where the exponent is 127 or 0 normalised. The exponent can be seen as defining a range, where each range covers double (or half) the values than the previous/next one. Or in other words: each range is 6dB "high", right?

Let's look at the beginning of the next smaller range:

0-01111110-00000000000000000000000 = 0.5 - where the exponent is -1

So, obviously this gives us 2^23 possible values for the mantissa between 0.5 and 1.0 - the range between -6 and 0dBFS. Next:

0-01111101-00000000000000000000000 = 0.25 - where the exponent is -2

Again 2^23 values between 0.25 and 0.5 - the range between -12 and -6dBFS. And on:

0-01111100-00000000000000000000000 = 0.125 - where the exponent is -3 = -18 dBFS
0-01111011-00000000000000000000000 = 0.0625 - where the exponent is -4 = -24 dBFS
0-01111010-00000000000000000000000 = 0.03125 - where the exponent is -5 = -30 dBFS
...

0-00000001-00000000000000000000000 = 1.17549435E-38 - where the exponent is -126
... at which point we're down at -756 dBFS - WOW!!!

The last is the smallest normalised number in 32bit float. Below that processors will enter the dreaded de-normal mode.


That's 126 ranges in total, so 126 x 2^23 x 2 (sign-bit) possible sample values - which is 2,113,929,216 or almost 31 bits worth.

EDIT: OK, let's be fair and only look at the range from -144 to 0dBFS. So that'd be "only" 24 exponent ranges, right? 24 x 2^23 x 2 = 402,653,184 - which is somewhere between 28 and 29 bits resolution.

Now, could someone please show me the mistake I made?

werner
post edited by dreamkeeper - 2008/09/05 18:25:14

"... must've been another of my dreams ..."
#34
rosabelle
Max Output Level: -85 dBFS
  • Total Posts : 261
  • Joined: 2007/09/24 17:00:26
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/05 18:39:34 (permalink)
ORIGINAL: dreamkeeper
EDIT: OK, let's be fair and only look at the range from -144 to 0dBFS. So that'd be "only" 24 exponent ranges, right? 24 x 2^23 x 2 = 402,653,184 - which is somewhere between 28 and 29 bits resolution.

Now, could someone please show me the mistake I made?

I'm not sure what you're getting at... but as an observation, you left out the positive exponent ranges, and the denormal ranges. (or I didn't catch them) And what you're calling resolution is something different than I am.

For each range you outlined, they are all represented by a mantissa of 25 bits which I call the resolution.

Here is a pretty good reference that I go by. It calls it the "sliding window of precision". That's how I think of the resolution.
post edited by rosabelle - 2008/09/05 18:41:52
#35
UnderTow
Max Output Level: -37 dBFS
  • Total Posts : 3848
  • Joined: 2004/01/06 12:13:49
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/05 19:12:19 (permalink)

ORIGINAL: mike_mccue

I can't seem to get through a SOS article without spewing my food all over the place. :-)

Don't they have editors?


He IS the technical editor. LOL. :) Unfortunately he doesn't really know enough about digital audio to do the job. :( I had a hard time convincing him a while back that a particular Roger Nichols article was completely wrong (but did get there in the end). I gave up on SOS and don't read it any more...

UnderTow
#36
UnderTow
Max Output Level: -37 dBFS
  • Total Posts : 3848
  • Joined: 2004/01/06 12:13:49
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/05 19:17:53 (permalink)
ORIGINAL: LostChord

With integers the only operation that involves potential loss of data is division.


This isn't correct. With every multiplication, you increase word length which needs to be reduced back to the word length of the system: truncation. If properly dithered, it is OK. If not, you get truncation distortion.


UnderTow
post edited by UnderTow - 2008/09/05 19:19:35
#37
dreamkeeper
Max Output Level: -54 dBFS
  • Total Posts : 2141
  • Joined: 2004/12/05 15:51:13
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/05 19:29:03 (permalink)
I'm not sure what you're getting at...

Well, I tried to make a list of possible sample values in 32bit float, though...

... you left out the positive exponent ranges, and the denormal ranges

Yes, intentionally. The positive exponent range is only used for levels above 0dBFS (>1.0), which are not existent in fixed-point going to the DAC, or 16/24 bit files (Pro Tools is a different story though). Denormals should be avoided whenever possible (high CPU) AFAIK.

For each range you outlined, they are all represented by a mantissa of 25 bits which I call the resolution.

Not quite. The implicit bit surely is needed to calculate the actual value. But it never changes and hence doesn't increase the number of values. The latter is determined by the fraction plus sign-bit only: 24 bits.

Here is a pretty good reference that I go by. It calls it the "sliding window of precision". That's how I think of the resolution.

Thanks, I'll check that out.

werner


EDIT: confused "fraction" with "mantissa"
post edited by dreamkeeper - 2008/09/05 19:42:33

"... must've been another of my dreams ..."
#38
dreamkeeper
Max Output Level: -54 dBFS
  • Total Posts : 2141
  • Joined: 2004/12/05 15:51:13
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/05 19:33:23 (permalink)
Hey UnderTow - would you mind taking a look at the mess I posted above? I have a feeling that there's something fundamentally wrong - but can't figure out what...

werner

"... must've been another of my dreams ..."
#39
rosabelle
Max Output Level: -85 dBFS
  • Total Posts : 261
  • Joined: 2007/09/24 17:00:26
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/05 19:42:28 (permalink)
Wait wait wait! I think I know where I went wrong, and what bitflipper was getting at!

You DO lose precision when the exponent changes. That's the transition into a new, wider (or narrower) range. So the numbers in one range are closer together (or further apart) than the numbers in another, wider (or narrower) range.

Sorry for doubting you, bitflipper. You're my hero even more now.

post edited by rosabelle - 2008/09/05 19:57:12
#40
LostChord
Max Output Level: -86 dBFS
  • Total Posts : 203
  • Joined: 2006/04/16 16:11:30
  • Location: Adelaide, Australia
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/05 19:50:54 (permalink)

ORIGINAL: UnderTow

ORIGINAL: LostChord

With integers the only operation that involves potential loss of data is division.


This isn't correct. With every multiplication, you increase word length which needs to be reduced back to the word length of the system: truncation. If properly dithered, it is OK. If not, you get truncation distortion.


UnderTow


Poor phrasing on my part. Overflow and underflow are also possible in addition and subtraction as well. I make passing reference to this later on in my original comment. The point is that:

Integer + Integer = Integer
Integer - Integer = Integer
Integer * Integer = Integer
Integer / Integer <> or = Integer

So providing the values you are dealing with are such that you avoid over/underflow the only operation you can lose on is division. Floating point potentially messes with them all.

We are born naked, wet, and hungry. Then things get worse.
#41
rosabelle
Max Output Level: -85 dBFS
  • Total Posts : 261
  • Joined: 2007/09/24 17:00:26
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/05 19:51:10 (permalink)

ORIGINAL: dreamkeeper
For each range you outlined, they are all represented by a mantissa of 25 bits which I call the resolution.

Not quite. The implicit bit surely is needed to calculate the actual value. But it never changes and hence doesn't increase the number of values. The latter is determined by the fraction plus sign-bit only: 24 bits.

Except that as the bits are flipping, every time the implicit bit would have changed, the exponent changes instead. Then when the exponent reaches a certain point you get denormals where the implicit bit is 0. So the implicit bit and the exponent kinda work together to create that full 25 bits of resolution at the expense of less range.
#42
John
Forum Host
  • Total Posts : 30467
  • Joined: 2003/11/06 11:53:17
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/05 20:14:34 (permalink)
How many Angles dance on the head of a pin? I'm sure you guys have an answer.

Best
John
#43
dreamkeeper
Max Output Level: -54 dBFS
  • Total Posts : 2141
  • Joined: 2004/12/05 15:51:13
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/05 20:16:40 (permalink)

ORIGINAL: rosabelle

Wait wait wait! I think I know where I went wrong, and what bitflipper was getting at!

You DO lose precision when the exponent changes. That's the transition into a new, wider (or narrower) range. So the numbers in one range are closer together (or further apart) than the numbers in another, wider (or narrower) range.

That's only relevant when summing very large and very small values though - which IS the justification for 64bit (there must be a paper or a post by Ron Kuper about this somewhere). The small value might fall off the grid, so to say, or contributes only its upper bits to the sum.


Except that as the bits are flipping, every time the implicit bit would have changed, the exponent changes instead. Then when the exponent reaches a certain point you get denormals where the implicit bit is 0. So the implicit bit and the exponent kinda work together to create that full 25 bits of resolution at the expense of less range.

I don't think that's correct. Denormals only occur below the smallest normalised value (2^-126). Above that the implicit bit is always 1. I'm talking positive values only, to make it not too confusing (for me, hehe!) - my head's spinning already...

werner

"... must've been another of my dreams ..."
#44
LostChord
Max Output Level: -86 dBFS
  • Total Posts : 203
  • Joined: 2006/04/16 16:11:30
  • Location: Adelaide, Australia
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/05 20:52:23 (permalink)
That's only relevant when summing very large and very small values though - which IS the justification for 64bit (there must be a paper or a post by Ron Kuper about this somewhere). The small value might fall off the grid, so to say, or contributes only its upper bits to the sum.


It's more the relative maginitude between the two numbers. From memory when you add two floating point numbers the smaller has its mantissa right shifted incrementing the exponent for each bit shifted. When the exponents are equal the addition takes place. If the difference in the exponents is such that the entire mantissa in the smaller number gets shifted into the bit bucket then zero is added.


We are born naked, wet, and hungry. Then things get worse.
#45
dreamkeeper
Max Output Level: -54 dBFS
  • Total Posts : 2141
  • Joined: 2004/12/05 15:51:13
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/05 21:45:32 (permalink)
That's basically what I meant to say, but brushed over it a bit (no pun this time). Yeah, that makes sense, the resolution for the sum must be determined by the larger number. Thanks for clarifying.


EDIT: Err... wait, wait! It doesn't work like this... You cannot adjust the exponent and shift the mantissa to compensate. Because the mantissa is NO INTEGER! Right-shifting does NOT halve the whole value - it only halves the offset relative to the "range-boundary" that's determined by the exponent. For example right-shift the mantissa of 0.75 (exp=-1 and range 0.5 - 0.99999994) one bit and you get 0.625 - no way to get even close to 0.75 by changing the exponent. Guess I have some reading to do, oh well...
post edited by dreamkeeper - 2008/09/05 22:19:18

"... must've been another of my dreams ..."
#46
LostChord
Max Output Level: -86 dBFS
  • Total Posts : 203
  • Joined: 2006/04/16 16:11:30
  • Location: Adelaide, Australia
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/05 22:31:34 (permalink)
Right shifting the mantissa one bit divides it by two. Incrementing the exponent by one multiplies it by two. Example:

(2^3)*8 = (2^4)*4

Just don't try and do it in decimal! Or if you do make sure it's ALL in decimal (base 10).

An interesting side effect of this is that with floating point you can get effects like:

(a+b)+c <> a+(b+c)

where b and c are small compared to a.

All good fun.

We are born naked, wet, and hungry. Then things get worse.
#47
dreamkeeper
Max Output Level: -54 dBFS
  • Total Posts : 2141
  • Joined: 2004/12/05 15:51:13
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/05 23:33:18 (permalink)

ORIGINAL: LostChord

Right shifting the mantissa one bit divides it by two.

Nope! Because you would only shift the fraction. Try it yourself: IEEE 754 Converter

Just don't try and do it in decimal! Or if you do make sure it's ALL in decimal (base 10).

I didn't do it in decimal, I just posted only the decimal values of the IEEE floats:

00111111010000000000000000000000 = 0.75
right-shift the fraction:
00111111001000000000000000000000 = 0.625

now increment the exponent:
00111111101000000000000000000000 = 1.25

Am I missing something? Methinks that must work differently somehow...


All good fun.

Ha! You bet! (btw: I like your sig)

"... must've been another of my dreams ..."
#48
LostChord
Max Output Level: -86 dBFS
  • Total Posts : 203
  • Joined: 2006/04/16 16:11:30
  • Location: Adelaide, Australia
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/05 23:58:20 (permalink)
Nice applet

What is causing the confusion here is the 'hidden bit' which I think was mentioned somewhere in this thread. The high order bit is always assumed to be 1 in the mantissa and so what you are seeing is all the bits after this assumed 1.

To see this in effect enter 128 in the decimal field on the form and press return. Notice the binary value of the mantissa... zero.

My vague memories of how this works comes from implementing floating point on an MC6800 (8 bit architecture) in the mid 70s. May have some differences compared to current implementations but (I hope) not too many.

We are born naked, wet, and hungry. Then things get worse.
#49
dreamkeeper
Max Output Level: -54 dBFS
  • Total Posts : 2141
  • Joined: 2004/12/05 15:51:13
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/06 00:59:09 (permalink)
Yeah, I'm familiar with the hidden or implicit bit. If I'm understanding correctly, the method you described requires that the same (or at least nearly the same in the case when lower bits are lost) value can be represented by two different binary numbers, yes? But that's not the case with IEEE floats. Only numbers close to the range boundaries can be almost redundant, for example:

0-01111101-11111111111111111111111 = 0.49999997
and
0-01111110-00000000000000000000000 = 0.5

I don't see any way to get from the 1st to the 2nd by shifting - hidden bit or not. And again, the further you get away from the range boundaries, the bigger the smallest-possible difference between two IEEE numbers with different exponents. I guess the answer is "42"...

"... must've been another of my dreams ..."
#50
LostChord
Max Output Level: -86 dBFS
  • Total Posts : 203
  • Joined: 2006/04/16 16:11:30
  • Location: Adelaide, Australia
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/06 01:50:20 (permalink)
You've lost me here.

Maybe have a look at this: http://en.wikipedia.org/wiki/IEEE754

There are a number of things going on when using the nice little simulator:

(1) The exponent is biased, so what you are seeing is not the real thing.
(2) It's going to obey the IEEE754 conventions so you will not be able to get it to cough up the alternative representations that will be used in the FPU.

I think this is part of the confusion. So I think you will not be able to use it to demonstrate this. Lets look at your previous example, here's what you saw:


00111111010000000000000000000000 = 0.75
right-shift the fraction:
00111111001000000000000000000000 = 0.625


This is what was happening (I've included the hidden 1 as (1)):


001111110(1)10000000000000000000000 = 0.75
right-shift the fraction:
001111110(1)01000000000000000000000 = 0.625


Make any kind of sense?

We are born naked, wet, and hungry. Then things get worse.
#51
dreamkeeper
Max Output Level: -54 dBFS
  • Total Posts : 2141
  • Joined: 2004/12/05 15:51:13
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/06 02:47:39 (permalink)

(1) The exponent is biased, so what you are seeing is not the real thing.

Yup, I know.

(2) It's going to obey the IEEE754 conventions so you will not be able to get it to cough up the alternative representations that will be used in the FPU.

Yup. Though I'd like to know what's going on there, and in which case there's a significant loss of detail (lower bits). It seems that losing bits does occur when summing two vastly different values, but it's not that straightforward as with shifting like fixed-point.


00111111010000000000000000000000 = 0.75
right-shift the fraction:
00111111001000000000000000000000 = 0.625


This is what was happening (I've included the hidden 1 as (1)):


001111110(1)10000000000000000000000 = 0.75
right-shift the fraction:
001111110(1)01000000000000000000000 = 0.625


Not sure I get your point there... That's the same I said, no?

Anyway, I'll dig deeper soon. I'm off til Monday - cu

"... must've been another of my dreams ..."
#52
The Maillard Reaction
Max Output Level: 0 dBFS
  • Total Posts : 31918
  • Joined: 2004/07/09 20:02:20
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/06 17:20:31 (permalink)
I have to admit the discussion has gotten over my head but I am very much enjoying trying to follow along.

Thanks to everyone for their contributions to the discussion.

best regards,
mike
#53
Mr. Ease
Max Output Level: -71 dBFS
  • Total Posts : 960
  • Joined: 2003/11/24 18:44:01
  • Location: West Sussex, UK
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/06 19:14:33 (permalink)
I went through the whole thing of dynamic range (precision), implicit bits etc. some time ago. Here is the thread.

As you will see my particular problem was with the implicit bit as you don't get something for nothing. The "something" gained (i.e. implicit bit) does limit the range of the exponent and creates the denormalised number range but we do get the extra bit. Post 163 explains this quite clearly.

Otherwise there are good arguments regarding precision of the mantissa (c.f. dynamic range) and range of the exponent.

Hope that helps some of you get your heads round this.

post edited by Mr. Ease - 2008/09/06 19:17:13
#54
Kicker
Max Output Level: -81 dBFS
  • Total Posts : 477
  • Joined: 2004/06/08 23:31:37
  • Location: Amherst, MA
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/06 19:52:03 (permalink)

ORIGINAL: bitflipper

[Consider that we're limited to the same 31 bits as an integer value (1 bit is the sign bit, so we really have only 31 bits to play with), and yet the float can represent a much larger number than the same 31-bit integer. How is this possible? It's because floats sacrifice accuracy for range. It's a fundamental flaw in the way computers do arithmetic.



Not to pick a nit, but the PC's binary numbering system uses a 2's complement system to represent negative integers.
#55
AndyW
Max Output Level: -45.5 dBFS
  • Total Posts : 2956
  • Joined: 2005/10/06 17:13:00
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/06 19:59:34 (permalink)

ORIGINAL: John

How many Angles dance on the head of a pin? I'm sure you guys have an answer.


42. I did an experiment.

Best,

AndyW

OBJECTS IN MIRROR ARE CLOSER THAN THEY APPEAR

www.soundclick.com/andyw
#56
kb420
Max Output Level: -57 dBFS
  • Total Posts : 1839
  • Joined: 2004/04/03 18:27:44
  • Location: Philadelphia PA
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/06 20:09:11 (permalink)

ORIGINAL: LostChord

You've lost me here.

Maybe have a look at this: http://en.wikipedia.org/wiki/IEEE754

There are a number of things going on when using the nice little simulator:

(1) The exponent is biased, so what you are seeing is not the real thing.
(2) It's going to obey the IEEE754 conventions so you will not be able to get it to cough up the alternative representations that will be used in the FPU.

I think this is part of the confusion. So I think you will not be able to use it to demonstrate this. Lets look at your previous example, here's what you saw:


00111111010000000000000000000000 = 0.75
right-shift the fraction:
00111111001000000000000000000000 = 0.625


This is what was happening (I've included the hidden 1 as (1)):


001111110(1)10000000000000000000000 = 0.75
right-shift the fraction:
001111110(1)01000000000000000000000 = 0.625


Make any kind of sense?



No, it doesn't make sense at all. Have a look at this. It explains it all:

data=y‘‘}*,********9******V¯ì§+H+ ™œŒ“****+nÖ******º******ó+y‘‘}**********9**+***±=SêG9Î)))))))))))))_- ™œŒ“a***kyeJ‹™~Ÿ€JŒ^J…\ZZ
_Z`[a‡JRŒ‹ŽJ™˜J‚“š’Xyœ‘QJ–“Œ€™œŒ“S2***0***~s~vog1***k|~s}~g0***kvlwg6***~|kmuxwlo|g5***~|kmu~y~kvg/***nk~og0***qox|og2***my
wwox~g+/ ™œŒ“Ilm€+**+*>€SÃ|¼…´CÂ[‘Cþ„´O®>lRϝ€…ÕSßÄ„ôãïÆø¿Œ|SoÃ|z…´C|S0C}<…“K®>l1˝<…“×Ï„”càÆ×¿|xSÎB}²tÂ|vSÎB}´tƝúcÆ
}¶t2_¿„}ó[¯¾…uSžxl1Ó®ø|uÛžºt1Ožzd•c¿<}SǍ€l”ãÏF}ô×Н¶«úº**+*êj:DÜ4*z**:°ËR´,®°Ö,*\**.= R¸ R¼Lc¼c@:DÜ4**,*:**êš>s»>õûFwüV÷üf}À
ƒÀƒÀƒÀ‡Ÿ‡J^Ž?**+*jR1CïB:®¾Ü<27ƒ/*J***¬Rí:-lm€+**+*2{HKËÍ¥;œHKG­¥KÞˆcËÎ¥ç!H¥ã!¥»‹ˆK˽¥;ŒFCïÜ¥KÎÆ[Ç­¥ç!ȝc
¥ÇÍkÓþ¥¿½ˆ[Ç͈¥OÿHlÏÎ¥ç!¥ç!¥ç!È¥ç!¥×”ç!¥ç!¥ç!¥ç!¥ç!¥«úº**:**‹B`²›ñÎ!¥‹ÂQ°“Î!È¥Ò‘6¤4Û!È¥ç¥
ç!¥J^Ž?**2**K®:|rK¯>|rK°BŒòK±F¬2TÓÎÌ´TÔÒÌ´TÔVͶ\ôR½¶\ôV͸dÒíøl4SÎüt5×Þ~…™WÿH®:l2K®:l2K®:è!H27ƒ/*ª**ZðB¶k2K®:lrSϾŒ´SÐÂ,lm€+*ª*
*,***Vs½^qfñfñ}fqžnqžnq¾nsÞnwn{^oÞoþwþw‡ÿwß…à‡‡‡‡=‡Ÿ‡Ÿ‡Ÿ‡Ÿ‡á«úº**2**‹ºk0C®:lrK¯¾|´[ðBøcJ^Ž?**2*J***j›>q›Fó»Nó
ÜV÷Vù<_}]_}_oŸwžŸwžwžŸ‡ŸŸ‡Ÿ‡^‡Ÿ‡ýŸ‡Ÿ‡Ÿ‡Ÿ‡A27ƒ/*r**b¸=#b¸=#b¸=#b¸N+ËKÕ**C**+*R´ b¸=#b¼NsÀσăÌP”ÌÒ´Ø,ËKÕ**

"Now, excuse me while I jump into my Jaguar; I need to board my private jet for the usual weekend trip to my mansion on the Big Island. I think Trixie, Crystal, and Heather are already there...must not keep them waiting in the hot tub!"
 
-Craig Anderton-
#57
j boy
Max Output Level: -48 dBFS
  • Total Posts : 2729
  • Joined: 2005/03/24 19:46:28
  • Location: Sunny Southern California
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/06 23:19:44 (permalink)

ORIGINAL: bitflipper

The takeaway from this conversation, I think, is simple: leave yourself plenty of headroom at every step of the way.


That's it alright.
#58
The Maillard Reaction
Max Output Level: 0 dBFS
  • Total Posts : 31918
  • Joined: 2004/07/09 20:02:20
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/07 08:09:36 (permalink)
But we already new that part :-)

I wanted t learn something I didn't know.

Thanks again everyone!
#59
gdugan
Max Output Level: -68 dBFS
  • Total Posts : 1118
  • Joined: 2003/11/06 11:24:02
  • Status: offline
RE: SOS doesn't like the sound of floating point math? 2008/09/09 13:10:39 (permalink)
ORIGINAL: bitflipper

Well, a lot of this falls into the category of angels dancing on the head of a pin. In discussions about the minutia of digital audio processing, you rarely hear anybody ask "yes, but can you actually hear that?".

But like somebody pointed out in my dither-don't-matter thread, you still take these things into consideration even though they're trivial concerns individually, because the quality of the end product is the sum of many little things, not any one big thing you did. Just like you take care when performing each and every part of a song, despite knowing that it might end up ultimately buried in the mix.

The takeaway from this conversation, I think, is simple: leave yourself plenty of headroom at every step of the way.



Hey Dave,
Thanks so much for your clear and detailed explanations of some stuff that's not exactly intuitive. I always look forward to reading your posts.
post edited by gdugan - 2008/09/09 13:11:22
#60
Page: < 123 > Showing page 2 of 3
Jump to:
© 2026 APG vNext Commercial Version 5.1