Am 12.11.24 um 17:25 schrieb Michael Matz via Gcc:

If you think of float as
approximated reals, then yes, division by zero is undefined (not
somewhat undefined!).

Depends on how you look at it.

IEEE 754-2008, for example, says in 7.3

"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)"

What may be undefined according to a language standard may become
defined by additional standards like IEEE, if they apply.

Best regards

        Thomas

Reply via email to