[ANSI-Smalltalk] Agenda items...

Paolo Bonzini paolo.bonzini at lu.unisi.ch
Wed Nov 14 06:16:52 GMT 2007


> I took a look at #precision, and I think in your case #epsilon fails 
> because Double>>precision is 52 and Float>>precision is 23.  However, 
> both of those can use an implicit bit in the mantissa, and thus (unless 
> they're denormalized) they actually use 53 and 24 significant bits, 
> respectively.  If precision is implemented like that, then it seems to 
> me that epsilon should work.

Right, so either epsilon is wrong, or fmax and fminDenormalized are. 
The formulas are taken out directly of 
http://www.open-std.org/JTC1/SC22/WG11/docs/n364.pdf and so we (or John) 
should first look at errata for *that* document.  Anyway, it defines the 
mantissa as being between r^-1 and (1-r^-p), which would say you're 
right (because for a Double 1-2^-53 != 1).

Paolo



More information about the ANSI-Smalltalk mailing list