3 ms·
+/- Infinity seems to be correct according to IEEE754. IEEE754 section 7.3: The divideByZero exception shall be signaled if and only if an exact infinite resu
by ketzu 5y ago
+/- Infinity seems to be correct according to IEEE754.
IEEE754 section 7.3:
The divideByZero exception shall be signaled if and only if an exact infinite result is defined for an
operation on finite operands. The default result of divideByZero shall be an ∞ correctly signed according to
the operation:
― For division, when the divisor is zero and the dividend is a finite non-zero number, the sign of the
infinity is the exclusive OR of the operands’ signs (see 6.3).
― For logB(0) when logBFormat is a floating-point format, the sign of the infinity is minus (−∞).