PackageDescription: IeeeFpSupport

Ieee Fp Support

Last published: September 22, 2004 by 'hallman'

Defines 2 Classes
Extends 7 Classes

Second pass at a temporary hack for IEEE 754 support for Nan's and Infinities. Currently, you have to start the vm with the -ieeefp switch to be able to pass Nans and Infs back and forth to C. The calls to C are necessary because there's no other way to find out whether or not a float or a double is actually a Nan, since every comparison to a Nan is supposed to return false.

There are a number of methods in stock VW that don't work for Nans. For example, the >= in Magnitude is defined as
>= aMagnitude
^(self < aMagnitude) not
If self is a Nan, this returns true.

This package includes tests that cover most of the behavior that Infs and Nans should exhibit. On Solaris, they all pass, but on Windows, some of the comparisons for Nans fail. In particular, VW under Windows has Nan > aFiniteNumber.

In truth, this package should not be necessary. All of the image behavior in here should really be encapsulated in primitives.