arbitrary precision floats?

Viktor vi.ki at worldonline.cz
Mon Nov 4 12:40:13 UTC 2002


> > Maybe something like this (?):
> >
> > [some operations] doWithPrecision: 100.
> >
> > Precision is thread-variable (Thread current precisionOf Floats).
> >
>
> Tempting, but that doesn't handle the case that you call back into
> another module -- the other module will get your module's floating point
> precision.  I guess we could posit yet a new kind of variable whith is
> thread-specific *and* module specific....

If that module needs specific precision, it will setup own precision of
floats at entry point and restore original precision on exit. This is how
works proposed

[some operations] doWithPrecision: 100

If the module does not need specific precision, everything is OK.

Viktor






More information about the Squeak-dev mailing list