|
-
September 19th, 2002, 07:12 PM
#1
Member
64-bit float
Can anyone explain to me how a floating point number is handled on a 64 bit architecture?
in this form:
|_|_________|_______________|
a b c
where
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
#2
*plays the jeopardy theme* I havent a CLUE. WTF is a mantissa??
*shrug* sorry, this is WAY above me
Remember -
The ark was built by amatures...
The Titanic was built by professionals.
-
September 19th, 2002, 09:16 PM
#3
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|