Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Rationals are computationally nasty. Even if you have hardware acceleration, they are going to be slow

So what? If you have both rationals and floats (and maybe arbitrary-precision decimals in between) as first class citizens, and give literals the most natural exact type unless a modifier to select floats is used, there's no unnecessary footguns.



What is nasty; brittle ad hoc code that tries to bend binary floats and or integer types to do the work rationals.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: