September 19th, 2002, 07:12 PM
Can anyone explain to me how a floating point number is handled on a 64 bit architecture?
in this form:
a b c
a is the sign bit
b is the exponent
and c is the mantissa
I'm just curious how exactly the assign the spacing whether it's 1, 31,32, or what.
September 19th, 2002, 08:52 PM
*plays the jeopardy theme* I havent a CLUE. WTF is a mantissa??
*shrug* sorry, this is WAY above me
The ark was built by amatures...
The Titanic was built by professionals.
September 19th, 2002, 09:16 PM
Here it is in laymans terms for others reading.
In programming there are two types of ways to declare a number as a variable.
- int - for integers that don't have a decimal. ie... 1, 2, 3, 4, 5, etc..
- float - for numbers with decimals. ie... 2.3487, 234.22, 2.564, etc..
An int variable stores its number in a 32 bit binary value. the first bit is a sign bit: 0 is + number, and 1 is a - number.
Floats are a bit different. A 64-bit float uses:
1bit (sign) 11bit (exponent) 52bit (mantissa)
hope that helps