29

*Fun with Javascript
`Math.ceil(1.0000000000000001) // output = 1`
`Math.ceil(1.000000000000001) // output = 2`

I hope it'll lit a spark in your mind.

Comments
  • 10
    The first is 1, because 1.0000000000000001 is considered equal to 1, because of float precision.
  • 20
    "Those who use java script for floating point operations are doomed."
    - me, just now.
  • 14
    Learn to float.
  • 1
    Ppl that trash the language/platform for something they don't understand 🔪🔪
Add Comment