Infinity?

Andreas Raab Andreas.Raab at gmx.de
Thu Oct 10 01:20:49 UTC 2002


Hi Richard,

Excellent explanation, thanks! Just one additional note:

> Now the IEEE 754 standard does *recommend* that there be a way to
> ask for interrupts or some other kind of signal instead of quietly
> producing infinities and NaNs, but it does not *require* this, and
> some systems have been produced lacking such means.  Until C99
> came out, there was no portable way to ask for this anyway, and we
> can't yet rely on finding C99 compilers and libraries, so it would
> be a lot of work for Squeak to ensure that such interrupts were
> given.

The problem is even worse than that. If you use some other libraries
these may change the FPU behavior "for you" (DirectX is known to do
that). If one of those does enable FPU exceptions Squeak will horribly
die - I've seen it happen which is why I added an explicit FPU
reset-and-continue operation to the VMs exception handling code (the
problem comes mostly from using different CRTLs which like to
re-initialize the FPU to what they think is the right mode...) It works
this way 'round since we rely on quiet and can catch "noisy" behavior
but if it were the other way around... oh boy ... there's no way you
could find out that some stupid library has reset the FPU short of doing
it on each and every primitive operation.

Cheers,
  - Andreas




More information about the Squeak-dev mailing list