# About NaN, 0/0 and false

**URL:** <https://discourse.julialang.org/t/about-nan-0-0-and-false/34272>\
**Category:** Numerics\
**Tags:** question\
**Created:** [February 6, 2020, 8:33pm UTC](https://discourse.julialang.org/t/about-nan-0-0-and-false/34272 "2020-02-06T20:33:51Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![Ralph\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ralph_smith/32/10344_2.png) [@Ralph\_Smith](https://discourse.julialang.org/u/Ralph_Smith)\
**Post date:** [February 8, 2020, 4:36am UTC](https://discourse.julialang.org/t/about-nan-0-0-and-false/34272/21 "2020-02-08T04:36:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [February 8, 2020, 8:12am UTC](https://discourse.julialang.org/t/about-nan-0-0-and-false/34272/22 "2020-02-08T08:12:57Z")

</div>

> [@joa-quim](#):
>
> It’s only me?

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

> <https://github.com/JuliaLang/julia/pull/34703>
>
> Trivial docs change documenting the "strong zero" property of \`false\`.
> 
> This c…omes up from time to time, eg 
> 
> https://github.com/JuliaLang/julia/issues/19168#issuecomment-324741603
> https://discourse.julialang.org/t/about-nan-0-0-and-false/34272/
> https://discourse.julialang.org/t/inconsistency-of-nan/28671
> 
> so this should clear up some of the confusion. Thanks @mschauer for the reference.

[Previous page](https://discourse.julialang.org/t/about-nan-0-0-and-false/34272.md?page=1)
