Post 9iaWVf5htJZHsBmfHE by clacke@libranet.de
 (DIR) More posts by clacke@libranet.de
 (DIR) Post #9iXKhspeqVgn2cSUfQ by aral@mastodon.ar.al
       2019-05-06T14:31:21Z
       
       1 likes, 0 repeats
       
       Oh, JavaScript, you silly sausage…> NaN === NaNfalse> typeof NaN'number'¯\_(ツ)_/¯* NaN stands for “not a number”
       
 (DIR) Post #9iXKhvSN5XqRBGaRHs by mdhughes@cybre.space
       2019-05-06T14:42:23Z
       
       0 likes, 0 repeats
       
       @aral https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaNNote they didn't fix window.isNaN, they just added a new function on Number. Because backwards compatibility means *backwards*.
       
 (DIR) Post #9iaVUPPcbD790CwBo8 by jack@mastodon.allnutt.net
       2019-05-06T15:56:51Z
       
       0 likes, 0 repeats
       
       @aral NaN !== NaN is specified behaviour for IEEE floating point numbers, though, so that one's not JS' fault
       
 (DIR) Post #9iaVUPrcv5W2P42YSW by aral@mastodon.ar.al
       2019-05-07T19:08:38Z
       
       0 likes, 0 repeats
       
       @jack Well, heck, can we at least agree it’s someone’s fault? :)It’s hard to make a case for x !== x
       
 (DIR) Post #9iaVUQDxa3NdWKUOGm by clacke@libranet.de
       2019-05-08T03:27:16Z
       
       0 likes, 0 repeats
       
       @aral @jack It's hard to make a case for Inf == Inf or NaN == NaN too.
       
 (DIR) Post #9iaVa9d4C3OjmzxxBo by clacke@libranet.de
       2019-05-08T03:28:19Z
       
       0 likes, 0 repeats
       
       @aral @jack $ node> Infinity == InfinitytrueAnd I can say that and still find faults with JS. 😁
       
 (DIR) Post #9iaWVf5htJZHsBmfHE by clacke@libranet.de
       2019-05-08T03:38:46Z
       
       0 likes, 0 repeats
       
       Of course, that's not JS's fault either. IEEE-754 1.2.5 draft:> Every NaN shall compare unordered with everything, including itself. Comparisons shall ignore the sign of zero (so +0 = −0).  Infinite operands of the same sign shall compare equal.web.archive.org/web/2018110103…
       
 (DIR) Post #9ijcUvkSp20ROQWOTw by jack@mastodon.allnutt.net
       2019-05-08T03:52:30Z
       
       0 likes, 0 repeats
       
       @clacke @aral btw if you want to have some fun with NaN and Inf, this is worth a watch: https://www.youtube.com/watch?v=5TFDG-y-EHs
       
 (DIR) Post #9ijcUw2tiUkeJb97DM by clacke@libranet.de
       2019-05-12T12:58:07Z
       
       0 likes, 0 repeats
       
       @jack @aral That was breathtaking.