| ▲ | fouronnes3 4 hours ago | |
Interesting! I'm not familiar with IEEE 1788. The TypeScript library (not-so-float) that I wrote which powers the calculator uses the JS Number type which is double precision IEEE 754. Outward rounding is not supported by JS so I used a bit level manipulation hack by casting to TypedArray [0] to implement the equivalent of C's nextafter() function. Otherwise I mostly followed Hickey & van Emden paper which is really delightful [1]. The real hard work is actually generating all the test cases. Good luck getting 100% test coverage on interval division! [0] https://github.com/victorpoughon/not-so-float/blob/main/src/... [1] https://fab.cba.mit.edu/classes/S62.12/docs/Hickey_interval.... | ||