Re:One does not simply calculate the absolute value
by croes on Sunday August 22, 2021 @04:38PM
(#28269371)
So for programming convenience we ignore correct math?
[ Parent
| on HN ]
Re:One does not simply calculate the absolute value
by FabHK on Sunday August 22, 2021 @05:08PM
(#28269627)
We cannot represent "correct math" on a computer, because the set of reals is uncountable, but in 64 bits we can only represent finitely many numbers, not infinitely many, let alone uncountably many.
And given that we have to implement some sort of approximation to the usual math on a closed subset of the reals (rationals, even), why not extend it with some "numbers" (negative zero, plus/minus infinity, NaNs) that, yes, enable programming convenience?