Remix.run Logo
zevets 5 days ago

Alternatively, any implementation of operator+ should have a notional identity element, an inverse element and be commutative.

AlotOfReading 5 days ago | parent [-]

C++ would be a very different language if you couldn't use floats:

(NaN + 0.0) != 0.0 + NaN

Inf + -Inf != Inf

I suspect the algebraists would also be pissed if you took away their overloads for hypercomplex numbers and other exotic objects.