[squeak-dev] Float storage as Double?

Lawson English lenglish5 at cox.net
Mon Apr 26 09:09:58 UTC 2010


I've been playing around with the Mandelbrot set and I noticed that the 
implementation using Float looked somewhat vague. After researching a 
while, it turns out (corrections welcome) that while Float performs 
64-bit FP calculations, only a limited number of decimal places are 
stored for subsequent calculations. Is there a way around this?

I can work up a "fixed" point Complex number simply by writing over the 
internal ScaledDecimal representation using using  z real: (z real) 
asString , but this is rather a lot of overhead and for precision less 
than 15ish decimal places, it would be nice to use hardware.


Any relatively easy way to do this (store native precision floating point)?

is there a faster way to truncate a ScaledDecimal than the above?


Lawson







More information about the Squeak-dev mailing list