Fix float comparison bugs in unit tests

See discussions in #133. Tested with SRM417 "TripleJump" and SRM171 "ResistorCombinations".