No, none of them are running. For a simple counterexample for the first, with a 64-bit (signed or unsigned) integer type and regular binary IEEE binary type, consider the case where x = 2**53 + 1and y = 2. Then, in accordance with IEEE 754 rules, assuming the normal rounding mode to round to the default parity, there TOFLOAT(x) + TOFLOAT(y)will be 2**53 + 2, and TOFLOAT(x + y)will be 2**53 + 4. Counterexamples for the case of multiplication should be equally easy to find.
EDIT: for multiplication a counterexample is given x = 2**53 + 1and y = 3.
source
share