`== and nan - docs accuracy?
Chris Angelico <[email protected]>
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <CAPTjJmo3af2imAQJbdZh8e6OYWsL8vDrbS2fdY5we=C=KMU=Sw@mail.gmail.com> |
http://pike.lysator.liu.se/generated/manual/modref/ex/predef_3A_3A/_backtick_eq_eq.html Pike v8.0 release 3 running Hilfe v3.5 (Incremental Pike Frontend) > `==(Math.nan, Math.nan); (1) Result: 0 > Math.nan == Math.nan; (2) Result: 0 This is correct behaviour per IEEE (NaN is not equal to anything, including itself), but the docs say that == returns true "iff the two floats are numerically equal or if both are NaN". Is this a docs bug, or is there something else going on here? ChrisA