Bug 46398

Critical

GemStone/S 64 Bit

3.3.5, 3.3.4, 3.3.3, 3.3.1, 3.3, 3.2.16, 3.2.15, 3.2.14, 3.2.13, 3.2.12, 3.2.11, 3.2.10, 3.2.9, 3.2.8.1, 3.2.8, 3.2.7, 3.2.6, 3.2.5, 3.2.4, 3.2.3, 3.2.2, 3.2.1, 3.2, 3.1.0.6, 3.1.0.5, 3.1.x, 3.0.x

3.4

Divide by float zero and other operations using floats do not signal exceptions

Operations that would return a Float that cannot produce reasonable results return an exceptional float, such as PlusInfinity or PlusQuietNaN, rather than signaling an exception.

For example,
    100 / 0.0 results in PlusInfinity
     -100.0 sqrt results in MinusQuietNaN

In 2.x and earlier, division by floating point zero did raise an exception, while other operations returned exceptional floats.

Workaround

When performing operations involving floats, explicitly check for exceptional float return values (see Number >> kind).

In version 3.4 and later, various kinds of FloatingPoint exceptions, including divide by zero, can be enabled.  See v3.4 Release Notes/FloatingPoint signalling Exceptions.


Last updated: 10/30/17