3 ms·
Is a == -b true when a and b are +inf and -inf? That's not what I would have expected.
by thaumasiotes 8y ago
Is a == -b true when a and b are +inf and -inf? That's not what I would have expected.
- jacobolus 8y agoYou are asking if ∞ == ∞? Yes.
- wutbrodo 8y agoIt's been years since I got my math degree, but IIRC this isn't true. At least, it's not true in enough framings that you can assert it this plainly. Infinity isn't just another number, and just because the symbols are identical in either side of the equals signs doesn't mean the entities described are.
- jacobolus 8y agoWe are talking about the floating point number format and the behavior of computer programming languages. In “mathematics”, the meaning of the symbol ∞ depends on what number system we are talking about. In some contexts ∞ is not a “number”, but rather a shorthand for a statement about limits. In other contexts it is a number. If you want to learn about the “affinely extended real numbers”, which is what floating point numbers more or less approximate, you can read https://en.wikipedia.org/wiki/Extended_real_number_line https://en.wikipedia.org/wiki/Extended_real_number_line