|
|
|
|
|
by Dylan16807
1561 days ago
|
|
Well let's look at wikipedia's list of things that cause IEEE NaN, since they already split out Infinity. 0/0, ∞/∞, ∞%n, n%0, ∞-∞, results with imaginary components The first five have no meaningful approximation or way to interact with anything. And there's no good way to pretend a single float is a complex number. So those results get the "this doesn't exist" treatment. Coder's choice if NaN triggers errors or not. Would you try to define any more behavior for any of those NaNs? |
|
Though really that choice is just about what kind of errors you’re showing users.