Hacker News new | ask | show | jobs
by zevets 274 days ago
Alternatively, any implementation of operator+ should have a notional identity element, an inverse element and be commutative.
1 comments

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.