| ▲ | SideQuark 10 hours ago | |
Completely worked out at least 20 years ago: https://www.lomont.org/papers/2005/CompareFloat.pdf | ||
| ▲ | fn-mote 9 hours ago | parent | next [-] | |
Note for the skeptic: this cites Knuth, Volume II, writes out the IEEE edge cases, and optimizes. | ||
| ▲ | mizmar 6 hours ago | parent | prev [-] | |
Great reading, thanks. Describes how to handle ±0, works with difference to avoid truncation errors. First half of the paper is arriving at this correct snippet, second part of the paper is about optimizing it. | ||