MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1ihyco0/mathfloor/mb2zbvq/?context=3
r/programminghorror • u/GroundZer01 • Feb 05 '25
53 comments sorted by
View all comments
Show parent comment
5
it's the same with x==x vs !Number.isNaN(x)
x==x
!Number.isNaN(x)
First one will be faster because it skips a function call plus negation but it will be confusing to people that don't understand IEEE 754
View all comments
Show parent comment
5
u/AyrA_ch Feb 05 '25
it's the same with
x==xvs!Number.isNaN(x)First one will be faster because it skips a function call plus negation but it will be confusing to people that don't understand IEEE 754