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

Sure, but this means those libm's aren't implementing IEEE 754.

Genuinely a bit shocked by this.



I don't particularly want to read the standard today to quote line and verse, but it's generally understood in the wider community that correct rounding is not required by 754 outside a small group of core functions where it's practically reasonable to implement. This includes everything from the 754 implementation in your CPU to compiler runtimes. Correct rounding is computationally infeasible without arbitrary precision arithmetic, which is what the major compilers use at compile time. If you're expecting it at any other time, I'm sorry to say that you'll always be disappointed.


I mean, maybe I am just an insane guy on the internet, but to me "correctly rounded", just sounds a bit different to "the implementor gets to decide, how many correct bits he wants to provide".


We're thankfully in a world these days where all the relevant implementations are sane and reliable for most real usage, but a couple decades back that was very much the practical reality. Intel's x87 instruction set was infamous for this. Transcendentals like fsin would sometimes have fewer than a dozen bits correct and worse, the documentation on it was straight up wrong until Bruce Dawson on the chrome team filed a bug report.




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

Search: