[BUG][IEEE Math][BASE] -- -2.0d raisedTo: (2.0d/3.0d) returns NaN using IEEE Math, but returns 1.5874010519682d without IEEE math

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[BUG][IEEE Math][BASE] -- -2.0d raisedTo: (2.0d/3.0d) returns NaN using IEEE Math, but returns 1.5874010519682d without IEEE math

mark.b.ballard


1) load the IEEE Math parcel from the preview directory (so we can print
the NaN).

2) evaluate

 ObjectMemory registerObject: true withEngineFor:
'IEEEFloatingPointPrimitives'. ObjectMemory compactingGC.

3) evaluate

-2.0d raisedTo: (2.0d/3.0d)

get NaN


4) evaluate

 ObjectMemory registerObject: false withEngineFor:
'IEEEFloatingPointPrimitives'. ObjectMemory compactingGC.

5) evaluate

-2.0d raisedTo: (2.0d/3.0d)

get
        1.5874010519682d

since it eventually evaluates

-2.0 negRaisedToNonInteger: (2.0d/3.0d)

Fails in Linux, and Windows,  probably Solaris, too.