subnormal floating point numbers

¬

¬a\\/b

Hi, ........
Finally, how do you declare your variables floats or doubles? Floats may
indeed be a performance buster, because internally the x86 (up to the
P3) worked on doubles. If you declare your variables as floats the
compiler issues the conversion instruction. In my case it was basically
the double to float conversion instruction, which caused both the
performance drop and also the FPU exception.

so why not use double?
 
J

Joe Wright

Charles said:
Maybe he means unnormalized. But I thought that with IEEE
floating point, *all* the floating point numbers *had* to
be normalized so the "phantom 0" could be recognized
correctly.
00000000 10000000 00000000 00000000
Exp = 1 (-125)
10000011
Man = .10000000 00000000 00000000
1.17549435e-38

The above is the IEEE FLT_MIN. Your "phantom" is b23 which is low order
of the exponent and high order of the mantissa. Decrementing the
exponent gives us..

00000000 00000000 00000000 00000000

...or zero. If a float has exponent 0 and any mantissa bit 1 it is
declared subnormal because it can't be normalized (Normalization
consists of moving mantissa bits left while decrementing the exponent.
As the exponent is already zero, it can't be further decremented).

A subnormal float converted to double will be normalized because double
has a wider exponent than float.
 
C

Charles Richmond

Charles said:
Maybe he means unnormalized. But I thought that with IEEE
floating point, *all* the floating point numbers *had* to
be normalized so the "phantom 0" could be recognized
correctly.

Sorry, I meant a "phantom 1" that exists at the beginning
of the fraction part in IEEE floating point.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,778
Messages
2,569,605
Members
45,238
Latest member
Top CryptoPodcasts

Latest Threads

Top