Save the Chearleader, Save the World

March 20, 2007

Dear NBC,

Please stop making awesome Heroes episodes and placing them online for free viewing. I need to be more productive when I get home from work.

That is all.

Blogged with Flock


Floating point numbers and inaccurate arithmetic

March 15, 2007

Floating point arithmetic is… at its worst when it is expected to model the interactions of quantities expressed as decimal strings that are expected to be exact.

Floating point – Wikipedia, the free encyclopedia

I’m running into this problem at work, where adding float values together results in slightly incorrect arithmetic. For example, for a given situation, I’m expecting the value 40.41, but the float value is stored as 40.40995. To work around this, I’ve had to round information to two decimal places after finishing sets of math operations. Kludge!

We will need to think about using decimal values instead of floats due to float’s arithmetic issues.

Blogged with Flock