About NaN, 0/0 and false

W. Kahan, one of the principal architects of IEEE floating point, wrote

Were there no way to get rid of NaNs, they would be useless. …
That is why some operations upon NaNs must deliver non-NaN results.
Every real ( not logical ) function that produces the same floating-point result for all finite and infinite
numerical values of an argument should yield the same result when that argument is NaN.

based on apparently sound reasoning and practical experience; his lecture notes and articles are easy to find. Kahan’s arguments seem to have convinced Julia developers, and apply to Bool * Real.

On the other hand, his successors on IEEE committees have drifted towards @joa-quim’s view (apostasy?), burying their reasoning in bureaucracy I haven’t had the patience to navigate.

3 Likes

It comes up from time to time, but remains to be undocumented, so I made

6 Likes