[ANSI-Smalltalk] Agenda items...
Paolo Bonzini
paolo.bonzini at lu.unisi.ch
Sun Dec 2 13:39:15 GMT 2007
> I am not sure that the exponents chosen are putting the mantissa in [1,
> 2)... why would that be?
>
> Andres Valloud wrote:
> > Paolo,
> >
> > Yes, the implementation here uses 1023 and -1022.
>
> Then you put the mantissa in [1,2), not [0.5,1).
Because, for example, 1 * 2^1023 is a valid IEEE number, but it is not
valid if expressed with a mantissa in [0.5,1). If you want to express
with the right mantissa range, you have to write it as 0.5 * 2^1024
(i.e. use an exponent of 1024).
I don't have time to check now, but it *might* be that IEEE used a
mantissa in [1,2). Smalltalk-98 however uses LIA-1 and I'm sure that
LIA-1 uses [0.5,1).
Paolo
More information about the ANSI-Smalltalk
mailing list