4 ms·
If you were to define a/0 the most logical choice would be a new special value "Infinity". The second best choice would be the maximum supported value of the ty
by ilius2 2y ago
If you were to define a/0 the most logical choice would be a new special value "Infinity". The second best choice would be the maximum supported value of the type of a (int, int64 etc). Anything else would be stupid.
- sidpatil 2y agoWhat if a is negative?
- ilius2 2y agoSame. Unless you want to differentiate -0 and +0 (which make it more complicated), you can not distinguish infinity from negative infinity.
- jsnedjdn 2y agoIEEE floating point representation does both
- HappMacDonald 2y agoJohn Conway can