Float Question
Tim Olson
tim at jumpnet.com
Sun Jan 3 16:18:26 UTC 1999
Oops, correction:
> 11 bits - value minus 1023 to produce an exponent in the range
> -1023 .. +1024
[should be -1023 .. +1023, emax=1023]
> - 16r000:
> significand = 0: Float zero
> significand ~= 0: Denormalized number
> (exp = -1024, no hidden '1' bit)
[should be exp = -1023]
>> fmax Definition: Report the largest value allowed by the
>>characterized floating point object representation. This satisfies the
>>ISO/IEC 10967 floating point characterization requirement fmax, and is
>>equal to:
> (1 - (self radix raisedTo: self precision negated)) *
> (self radix raisedTo: self emax)
I think this equation is off by a power of 2, or the definition of "emax"
is wrong:
(1 - (2 raisedTo: 53 negated)) => number slightly less than 1.0
if we multiply this by (2 raisedTo: 1023) we get
8.98846567431157e307
which is exactly half the correct value (1.797693134862315e308)
-- tim
More information about the Squeak-dev
mailing list
|