DSPRelated.com
Forums

Newbie question on FFT

Started by Michel Rouzic May 19, 2005
> I'm thinking of the things like the "hidden > bit" which increases your precision by ~6dB for "free" and denormals.
hidden bit? what is that?
Michel Rouzic wrote:
>>I'm thinking of the things like the "hidden >>bit" which increases your precision by ~6dB for "free" and denormals. > > > hidden bit? what is that?
Not so much hidden as assumed. The way floating-point numbers are normalized, the most significant bit of the mantissa is always 1.* That being the case, there's no need to waste space representing it; just assume it's there. Jerry __________________________________ * Decimal floats are represented as x.y*10^n, binary floats, as x.y*2^n, where x is a single non-zero digit. In decimal, x can be 1, 2, ... 9. In binary, it is always 1 and can be assumed. -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
in article 1117888476.783826.31940@g49g2000cwa.googlegroups.com, Michel
Rouzic at Michel0528@yahoo.fr wrote on 06/04/2005 08:34:

>> I'm thinking of the things like the "hidden >> bit" which increases your precision by ~6dB for "free" and denormals. > > hidden bit? what is that?
there's a nice webpage (probably dozens of them) on the subject at http://stevehollasch.com/cgindex/coding/ieeefloat.html . go to "The Mantissa". -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
> Not so much hidden as assumed. The way floating-point numbers are > normalized, the most significant bit of the mantissa is always 1.* That > being the case, there's no need to waste space representing it; just > assume it's there. > > Jerry > __________________________________ > * Decimal floats are represented as x.y*10^n, binary floats, as x.y*2^n, > where x is a single non-zero digit. In decimal, x can be 1, 2, ... 9. In > binary, it is always 1 and can be assumed. > -- > Engineering is the art of making what you want from things you can get. > =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF oh yeah, i remeber that, i learnt that at school. and damn, i got bad memories from trying to write by hand IEEE floats in binary, in architecture tests and all that. yeah, that hidden bit makes me think that it's definitly a smart way to represent floats.
Michel Rouzic wrote:
>>Not so much hidden as assumed. The way floating-point numbers are >>normalized, the most significant bit of the mantissa is always 1.* That >>being the case, there's no need to waste space representing it; just >>assume it's there. >> >>Jerry >>__________________________________ >>* Decimal floats are represented as x.y*10^n, binary floats, as x.y*2^n, >>where x is a single non-zero digit. In decimal, x can be 1, 2, ... 9. In >>binary, it is always 1 and can be assumed. >>-- >>Engineering is the art of making what you want from things you can get. >>����������������������������������������������������������������������� > > > oh yeah, i remeber that, i learnt that at school. and damn, i got bad > memories from trying to write by hand IEEE floats in binary, in > architecture tests and all that. yeah, that hidden bit makes me think > that it's definitly a smart way to represent floats.
Smart for general-purpose use, or when you need (or don't know you don't need) the extra precision. Dumb when you know you don't. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Michel Rouzic wrote:

>>Not so much hidden as assumed. The way floating-point numbers are >>normalized, the most significant bit of the mantissa is always 1.* That >>being the case, there's no need to waste space representing it; just >>assume it's there.
> oh yeah, i remeber that, i learnt that at school. and damn, i got bad > memories from trying to write by hand IEEE floats in binary, in > architecture tests and all that. yeah, that hidden bit makes me think > that it's definitly a smart way to represent floats.
Before I ever heard of hidden bits I learned to read S/360 floating point from hex dumps. There are six, 14, or 28 hex digits, and an exponent giving the position of the hexadecimal point. Very easy. Reading IEEE floats from a hex dump is much harder. -- glen
glen herrmannsfeldt <gah@ugcs.caltech.edu> writes:
> Michel Rouzic wrote: > > >>Not so much hidden as assumed. The way floating-point numbers are > >>normalized, the most significant bit of the mantissa is always 1.* That > >>being the case, there's no need to waste space representing it; just > >>assume it's there. > > > oh yeah, i remeber that, i learnt that at school. and damn, i got bad > > memories from trying to write by hand IEEE floats in binary, in > > architecture tests and all that. yeah, that hidden bit makes me think > > that it's definitly a smart way to represent floats. > > Before I ever heard of hidden bits I learned to read S/360 floating > point from hex dumps. There are six, 14, or 28 hex digits, and an > exponent giving the position of the hexadecimal point. Very easy. > > Reading IEEE floats from a hex dump is much harder.
Talking about reading memory dumps says something about your age. :-) Mentioning hex dumps further categorizes your history as does your frequent postings to the PL/I newsgroup.
"glen herrmannsfeldt" <gah@ugcs.caltech.edu> wrote in message
news:ge2dncQrXdNNMD_fRVn-jQ@comcast.com...
> Michel Rouzic wrote: > > >>Not so much hidden as assumed. The way floating-point numbers are > >>normalized, the most significant bit of the mantissa is always 1.* That > >>being the case, there's no need to waste space representing it; just > >>assume it's there. > > > oh yeah, i remeber that, i learnt that at school. and damn, i got bad > > memories from trying to write by hand IEEE floats in binary, in > > architecture tests and all that. yeah, that hidden bit makes me think > > that it's definitly a smart way to represent floats. > > Before I ever heard of hidden bits I learned to read S/360 floating > point from hex dumps. There are six, 14, or 28 hex digits, and an > exponent giving the position of the hexadecimal point. Very easy. > > Reading IEEE floats from a hex dump is much harder.
True, but a good hex editor will offer a mode to interpret the data as IEEE floating point.
> True, but a good hex editor will offer a mode to interpret the data as IEEE > floating point.
true, just like hex workshop. after all, its up to programs/machines to read the binary/hexadecimal stuff, and since my hex editor can interpret floats and doubles both in little-endian and big-endian, i have no reason to complain :)