[squeak-dev] FloatMathPlugin in Squeak for Croquet compatability?

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Tue Dec 14 02:35:17 UTC 2010


The squeak implementation is awfully inexact, even worse than Intel !
With this respect, I prefer the FloatMathPlugin.

For example:
(Float pi / 2) cos
  -> 1.224606353822377e-16
((Float pi / 2) asArbitraryPrecisionFloatNumBits: 53) cos
  -> (ArbitraryPrecisionFloat readFrom: '6.123233995736766e-17'
readStream numBits: 53)

A factor 2... That's many ULP !

Nicolas

2010/12/14 Levente Uzonyi <leves at elte.hu>:
> On Mon, 13 Dec 2010, Matthew Fulmer wrote:
>
>> Croquet (and thus Open Cobalt) requires that squeak images
>> perform floating point operations bit-identically across
>> machines, and the FloatMathPlugin was added to the VM to ensure
>> this is the case.
>>
>> Now that OpenCobalt is nearly ready for debut onto the Squeak
>> trunk, I'm wondering if this should be enabled by default in
>> squeak images. FloatMathPlugin is included in standard VMs, but
>> is not used by non-Croquet images. I'm wondering if we should
>> change that.
>>
>> I uploaded the code and test case for this feature at:
>>
>> http://bugs.squeak.org/view.php?id=7583
>
> There were plans about using the primitives during the developement of
> Squeak 4.1. They also give a nice speed up if you're using SqueakVM, but
> some of them (#sin, #cos, etc.) are slower with CogVM.
> In Kernel-mtf.527 the behavior of the methods is different if the receiver
> is NaN.
>
>
> Levente
>
>>
>> --
>> Matthew Fulmer (a.k.a. Tapple)
>>
>>
>
>



More information about the Squeak-dev mailing list