Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: PowerPC Numerics / Part 3 - Appendixes
Appendix E - MathLib Reference


Floating-Point Data Formats

Figure E-1
Table E-1 Interpreting floating-point values
If biased
exponent e is:
And fraction f is: Then value v is:And class of v is:
0 [72](any) v = (-1)s×2(e+-bias)×(1.f) [73]FP_NORMAL
e = 0 f 0 v = (-1)s×2minexp×(0.f) [74]FP_SUBNORMAL
e = 0 f = 0 v = (-1)s×0 FP_ZERO
e = max f = 0 v = (-1)s× FP_INFINITE
e = max f 0 v = NaN FP_SNAN (first bit is 0)
FP_QNAN (first bit is 1)
Table E-2 Class and sign inquiry macros
fpclassify(x)
isnormal(x)
isfinite(x)
isnan(x)
signbit(x)
Floating-point data formats


[72] max = 255 for float; 2047 for double and long double.
[73] For long double both head and tail are evaluated this way and added together.
[74] minexp = -126 for float; -1022 for double and long double.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996