Hi,
The long real format is:
Bit 63: sign
bit 52-62: exponent
Bit 0-51: mantissa
For short and long reals the mantissa is always assumed to be in
the range 1.0 <= m < 2.0. (We're ignoring denormalized numbers). Since the
first bit of the mantissa is always 1 it is not stored and is implicit in
the mantissa.
Starting with the number -26.59375, the first thing to do is take
out the sign. It is negative so bit 63 is a one. Then we have 26.59375.
The next thing to do is to normalize into the range 1.0 <=m < 2.0; this
will also get us the exponent. In this case we divide by 2 to the 4th power,
or 16 and get: 1.662109375. The exponent must be biased by 1023 for long
reals so we have an exponent of 1027.
We discard the 1 since this is long real and get .662109375. Then
we start subtracting out negative powers of two:
0.662109375
- 0.5 (2 to the -1)
0.162109375
- 0.125 (2 to the -3)
0.037109375
- 0.03125 (2 to the -5)
0.005859375
- 0.00390625 (2 to the - 8)
0.001853125
- 0.00097655 (2 to the - 10)
0.000876575
- 0.000478275 ( 2 to the -11)
0.000398300
- 0.0002382875 ( 2 to the - 12)
0.0001600125
You'd go on like that until you got all 51 bits of the mantissa.
Putting the digits together we get:
101010010111... so the answer is (approximately)
110000000011101010010111... (Filled out to 64 digits)
Have fun,
David