Hacker News new | ask | show | jobs
by ben509 2490 days ago
Related to that problem, a major source of confusion with IEEE floats is that languages go to great lengths[1] to present them as decimals and hide the underlying binary denominator. Even when you know they're binary internally, it throws you off.

High level languages are also annoying in that they don't provide great support for working with them as binary denominated rationals, e.g. there's no round_base2 in python, and there's no hex float representation in printf.

[1]: https://news.ycombinator.com/item?id=10915182

1 comments

Python doesn't support hex float in printf, but it does give you an easy way to do the conversion: x.hex()