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

Decimals are notoriously hairy to implement

Only floating-point decimal is hairy. Fixed-point decimal is hardly more difficult than integer math.



If you simply look at any of the real world implementations, you'll see it's not so easy. Rust has a few readable and educational crates that implement decimals, if you want to take a look.




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

Search: