A lot of the bitching about react always had the same flavour of the complaints that JavaScript dares to have a NaN
To be fair it is stupid that NaN !== NaN but that is how IEEE and CPUs made floats to be
To be fair it is stupid that NaN !== NaN but that is how IEEE and CPUs made floats to be
hypot(Inf, NaN)
being Inf rather than NaNto my weak undestanding only pow and hypot behave like this; pow for math reasons and i could guess that hypot does that to sorta have |x| <= hypot(x,y)
funny story, I was once interviewing for a job where the tech guy did not know that NaN existed. I guess JavaScript wasn't his language, but not sure what was, and the code was in JavaScript for a Web Dev role.
JS is weird, and not having a stronger separation between ints and floats makes NaNs more common than in other languages (eg parseInt would not return NaNs in C or python) but for many "weird" examples people are making fun of normal stuff.