this post was submitted on 11 Mar 2025
-9 points (40.4% liked)
Programmer Humor
21455 readers
1537 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
But that's a stringify method, tho.
JS passes a float to the console. Console prints the float however it wants to.
Just do strict comparison when you want to compare a variable to
1e-5
.Cause a string of
0.00001
should be passed throughparseFloat
(or whatever your language equivalent is) before you compare it to a variable with the valuef0.00001