Sunday, September 11, 2011

Welcome to Debugging

I just spent around 4 hours trying to find a bug in my code, only to find a stinking rounding error. That I can't control. Yippee!
Somehow, DrRacket thinks that 12.0 x .0254 (number of meters in a foot) is 0.30479999999999996 rather than the correct 0.3048. It makes enough of these little errors over the course of a long string of computations that my tests are failing. Could anything be more frustrating? Okay, probably. But not right now.

No comments:

Post a Comment