3DSoftware.com > Programming > Floating Point > Page 3
Floating Point Numbers  Page 3
 
Wide Floating Point
 
The default floating point format for personal computers allocates only 32 or 64 bits for each number, with significands that are 24 and 53 bits respectively. We need more precision than that, so we are developing a simple floating point format that supports 180 bits for the significand of each number (with 150-bit precision, as explained on the next page). We refer to these wide floating point numbers as WideFloat.
 
Our programs run on personal computers that use AMD processors. The WideFloat type of numbers discussed in this article are for our programs that run on AMD-based computers.
 
Our current implementation of WideFloat is a floating point number with a 180-bit significand. This type of number has a sign flag to specify the sign of the significand, and also has a 32-bit exponent which is a signed integer (not biased).
 
Significand
 
The significand of these numbers is like a WideInteger, which is a type of integer that is larger than the default types of integer.
 
While significands are integers, they behave differently than integers in an important respect: they grow (multiply) fractionally in the opposite direction. Actual integers are only whole numbers that when multiplied grow larger, adding more digits to the left of the radix point. Significands grow fractional digits in the other direction, with each additional new digit to the right adding less than (instead of more than) the adjacent digit. These digits are in reverse order than for integers. Other than that, significands are like integers.
 
Digits
 
In this implementation, a digit is 30 bits.  These are digits in Base 2^30.  Each digit can have a value in the range [0, 2^30 – 1].  This is different than other bases.  A Base 10 digit can be [0,9].  A Base 2 digit can be [0,1].  In Base 2^30, a digit can be 0, 1, 2, 3, ... 2^30 – 3, 2^30 – 2, or 2^30 – 1.
 
We store each digit in a 32-bit digit packet (with 2 high bits cleared) suitable for SIMD processing:
 
 
In Base 10, the point that separates the fractional part of a number from the whole part is called a decimal point. In other bases, that point is called a radix point.
 
For arithmetic operations (such as multiplication) to be performed on a number, the radix point must be between digits, not within a digit. For arithmetic operations to be performed on this number system of 30-bit digits, the radix point must be between 30-bit digits, not within a 30-bit digit.
 
—  Page 3  —
 « Page 2 Contents Page 4 » 
 
Copyright © 2008 by 3D Software. All rights reserved.
3D Software, P.O. Box 221190, Sacramento CA 95822 USA
www.3DSoftware.com     Contact us
Thursday, 20-Nov-2008 12:43:48 GMT