4 ms·
How else would you represent a branch cut or even a jump at 0? https://people.freebsd.org/~das/kahan86branch.pdf https://people.freebsd.org/~das/kahan86branch.
by nimish 5y ago
How else would you represent a branch cut or even a jump at 0?
https://people.freebsd.org/~das/kahan86branch.pdf https://people.freebsd.org/~das/kahan86branch.pdf from the father of ieee-754 is illuminating.
- croes 5y agoSo for programming convenience we ignore correct math?
- FabHK 5y agoWe 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?
- croes 5y agoThere is a difference between 2.4987665678 as 2.5 and undefined as ±infinity especially because 1.0/+0.0 is +infinity and 1/0 is just an exception in Java. Shouldn't it be the same result?
- FabHK 5y agoHaha, was just going to link that. Here's an ELI5, though not that illuminating: https://hackernoon.com/negative-zero-bbd5fd790af3 https://hackernoon.com/negative-zero-bbd5fd790af3 But, bottom line, Kahan (not only the father of IEEE 754, but also, with Golub, father of the SVD!) has thought about it a lot, and though he called the signed zero "a pain in the ass", he also said "There really wasn’t a way around that and you were stuck with it." http://history.siam.org/pdfs2/Kahan_final.pdf http://history.siam.org/pdfs2/Kahan_final.pdf
- edflsafoiewq 5y agoI don't really understand. Why is it important that there be two zeros so that 1/ (+0) = +∞ but 1/ (–0) = –∞ but not that there be two, say, 3s so that 1/ (3⁺ – 3) = +∞ but 1/ (3⁻ – 3) = –∞
- pests 5y agoBut we already have two threes: +3 and -3. It's not that it's important there be two, just every number already had 2 except for 0.