@[email protected] to Programmer [email protected] • 22 hours agoWhich of these javascript expressions is false?lemmy.mlimagemessage-square52fedilinkarrow-up1313cross-posted to: [email protected]
arrow-up1313imageWhich of these javascript expressions is false?lemmy.ml@[email protected] to Programmer [email protected] • 22 hours agomessage-square52fedilinkcross-posted to: [email protected]
minus-square@[email protected]linkfedilink47•19 hours ago Spoiler What is the rationale for all comparisons returning false for IEEE754 NaN values?
minus-square@[email protected]linkfedilinkEnglish15•17 hours agoThat one wasn’t the one I had issues with, since the concept is essentially the same across all languages. We say it’s false because we can’t conclusively say that it’s true. Same as the reason why null != null in SQL.
minus-squareVictorlinkfedilink1•5 hours agoIt also makes a lot of conditional expressions less complicated because comparisons of all kind against NaN return false.
Spoiler
What is the rationale for all comparisons returning false for IEEE754 NaN values?
That one wasn’t the one I had issues with, since the concept is essentially the same across all languages. We say it’s false because we can’t conclusively say that it’s true. Same as the reason why null != null in SQL.
It also makes a lot of conditional expressions less complicated because comparisons of all kind against NaN return false.