4 ms·
> Zero Divide By Zero: > This question asks whether in floating point 0.0/0.0 is a non-NaN value, which it is not. NaN generation is desirable here, since it w
by kazinator 8y ago
> Zero Divide By Zero:
> This question asks whether in floating point 0.0/0.0
is a non-NaN value, which it is not. NaN generation is desirable here, since it will propagate to the output as a NaN and thus make the user suspicious.
Horrible nonsense. What is desirable is an exception so that it's loudly confirmed to the user that something has screwed up. We don't want to lead the user on with subtle hints and suspicions.
Even a dollar store calculator from 1985 gets this right by locking up with an E on he display, requiring a clear.
- jmalicki 8y agoThis is configurable. Sometimes you want to see 99% of your results and know those were weird ones, and you can deal later.