“Precision is Important” or “Lessons in Floating Point Math”

That 0.00000000000001 percent makes all the difference.



Math Problem

I’ve been working on a math problem lately. I’ve been trying to figure out how to turn 1/2 into 1 while avoiding any multiplication or addition.

Then this morning it hit me. I need to divide 1/2 by 1/2. It’s not intuitive but it should work… given enough time.