Using smarter floating point comparisons to eliminate pesky floating point errors