3DSoftware.com > Programming > Floating Point > Page 10
Floating Point Numbers  Page 10
 
Wide Floating Point
 
Data Exchange Format
 
This page covers data exchange of WideFloat numbers.
 
FloatBin
 
FloatBin is a binary format. The leading bit is an error flag, the second bit is the sign of the significand, the next group of bits is the Base 2 exponent, and the remaining bits are the significand.
 
We are currently supporting the following 18-byte (144-bit) FloatBin number format:
 
 
The leading bit is an error flag. If that bit is clear (equal to zero), then the number being stored is valid. If that bit is set (equal to 1), then the number being stored is invalid.
 
If the number being stored is valid, the leading bit of this format is clear, the second bit is the sign bit of the significand, and the next 14 bits after that is the radix 2 exponent in signed-magnitude form: the high bit is the sign of the exponent; the other 13 bits is the magnitude of the exponent. A sign bit is clear if positive, set if negative. The remaining 128 bits is the binary significand, assuming only the first bit is to the left of the radix point when the exponent is zero. The leading significand bit is stored, not hidden.
 
If the exponent magnitude is too large to be saved to this format, the number stored is invalid (overflow). If the exponent magnitude is too small, the number is stored as zero. Denormals are not supported. Zero is stored as all bits cleared. Negative zero is not supported.
 
If the leading bit of this format is set (equal to 1) then the number being stored is invalid, the second bit is clear, the next 14 bits after that is a 14-bit unsigned integer that specifies the types of invalid number (1 = positive overflow, 2 = negative overflow, 4 = positive divide by zero, 8 = negative divide by zero, 0x2000 = other invalid number), and the remaining 128 bits are cleared. Multiple invalid types can be specified for an invalid number.
 
—  Page 10  —
 « Page 9 Contents
 
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:07:50 GMT