[ANSI-Smalltalk] Agenda items...

Paolo Bonzini paolo.bonzini at lu.unisi.ch
Thu Nov 15 06:12:31 GMT 2007


Andres Valloud wrote:
> Paolo,
> 
> Yes, the implementation here uses 1023 and -1022.

Then you put the mantissa in [1,2), not [0.5,1).

> Hmmmm... I am not 
> sure about emax / emin being off by one though.  If the range goes from 
> 0 to 2047, and 0 and 2047 are taken, then that takes one off from each 
> side, and 1024 / -1021 do not balance out that way?..

The available range is 1 to 2046, and the offset is for some weird 
reason 1022 (for LIA) or 1023 (for [1,2) mantissa).  Anyway, it does not 
matter to the hardware except for multiplication/division, since for 
addition and subtraction it only cares about the *difference* between 
the exponents.

(I am not saying that emax/emin are off by one in the standard, but in 
VW.  Just to be sure, in GNU Smalltalk I load the emin/emax/precision 
values directly from float.h at run-time, since C is LIA-compliant.  The 
answers are -1021/1024/53).

Paolo



More information about the ANSI-Smalltalk mailing list