home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Education Sampler 1992 [NeXTSTEP]
/
Education_1992_Sampler.iso
/
NeXT
/
Misc
/
HigherEducationMailbox.mbox
/
Archives_provide_val_.attach
/
May_91
/
misc.554
< prev
next >
Wrap
Text File
|
1991-05-21
|
2KB
|
55 lines
{\rtf0\ansi{\fonttbl\f0\froman Times;\f1\fmodern Courier;}
\paperw11760
\paperh7200
\margl120
\margr120
{\colortbl\red0\green0\blue0;}
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f0\b0\i0\ul0\fs28\fc0 NextAnswers floating point number format\
\
Q: How are NeXT's floating-point numbers stored in memory?\
\
A: Floating-point numbers are stored in IEEE binary format, as specified in \
ANSI/IEEE Std 754-1985. There are two different precisions used for storage.\
\
NeXT data storage in general is "big endian", meaning that the most significant\
bytes of an integer are stored in lower memory, and the LSB is at the high-memory\
end of the int.\
\
The single-precision floating-point format, corresponding to type "float" in C, occupies 4 bytes as follows:\
\
Bit 31 (high bit of MSB): Sign bit\
\
Bits 23 - 30 8-bit exponent, in "excess 127" format (a bias of 127\
is added to the twos-complement exponent value).\
\
Bits 0 - 22 23-bit significand fraction, left-justified in storage. The\
integer part of the significand is not stored. If the\
number is 0 (biased exponent and fraction are both 0)\
or denormalized (biased exponent field is 0, but fraction\
is not), the integer part is understood to be 0. Otherwise\
it is understood to be 1.\
\
\
The double-precision floating-point format, type "double" in C, occupies 8 bytes:\
\
Bit 63: Sign bit\
\
Bits 52 - 62 11-bit exponent, in "excess 1023" format.\
\
Bits 0 - 51 52-bit significand fraction.\
\
\
There is also an extended-precision format, which is not used for data storage.\
\
QA
\pard\tx1152\tx2304\tx3456\tx4608\tx5760\tx6912\tx8064\tx9216\tx10368\tx11520\fc0 554
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc0 \
\gray666 \
Valid for 1.0 \
Not checked yet for 2.0\
\