12
euph
7y

FLOATING POINT PRECISION! FUCK YOU! Spent so much time trying to figure out what was wrong with an algorithm I made to calculate and correct bounding only to finally realise, after printing out every single variable and calculating everything manually to realise the value was off by 0.0001 which made it skip an if statement. Ughhhhhhhh, so much freaking time wasted

Comments
  • 7
    Learning the hard way huh?
    Every single bit of documentation regarding "float", points out how unreliable they are for precise operations.
    We all know it but sometimes we just have to let it hit us in the face to accept it haha.
    But hey at least it's never going to happen to you again right?
  • 4
    Same for me...
    I made a slider using floats and if you changed the slider you didnt get a 1.1 or 1.3 or something... IT'S A 1.11000302 fml
  • 0
    @nitaj96a nope, C++
Add Comment