Fix a bad bit of floating point math, and extract a utility class (with tests) for it.
Add one more assertion and a todo.
Merge pull request #96 from cgruber/fixmath

Fix a bad bit of floating point math, and extract a utility class (with tests) for it.