|
|
|
|
|
by nycticorax
50 days ago
|
|
This is only somewhat related, but: Has there ever been a language that adopted IEEE-754-like semantics for integer types? (Yes, I know this would be slow without hardware support.) By this I mean adding valid values for (signed) ints to represent positive infinity, negative infinity, and not-a-number; then use these values as the results of overflow, underflow, and division by zero in the natural way. It just seems like if these sort of values are useful in floating-point arithmetic, they might well be useful for integer arithmetic as well, for many of the same reasons. |
|
NaN is almost always a mistake, and adding it breaks the law of identity. You don't want it.