-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audit for binary IEEE 754-2008 compliance on relevant platforms #10087
Comments
Some clarification on IRC, I don't want to take on the gargantuan task of implementing cross-platform implementations of the stuff that fails, yet. (sqrt and fma is the things I think may fail to be accurate / have wrong NaN handling on a few platforms)
|
I think the major deficiency in LLVM is the current lack of sNaN support by many of the instructions/intrinsics. |
I agree, and the platforms affected shouldn't be too hard to find once we have the tests. |
Triage bump. Still relevant, nothing to add. |
Triage bump: no change |
Triage: no change |
Should this be updated to audit against the new spec? |
Also: We definitely cannot obtain binary compliance currently on many platforms, even those that are not "embedded", without extensively patching our operations there, because there are platforms that have nonstandard behavior, even if it's just for the sole reason of "their silicon literally predates the standard of IEEE754-2008". So LLVM's problems are not necessarily the only gateway to pass. For aarch64, x86-64, ppc64le, and a few other targets, this is comparatively minor as a concern. |
Some problems and possible solutions:
On x86_64 with SSE2 and aarch64 with Neon, our f32 and f64 behave more-or-less "as expected" at runtime, barring LLVM compilation oddities. |
@thestinger filed #9987, and I thought we should get the ball rolling on documenting and testing IEEE 754-2008 compliance for Rust on non-embedded platforms.
I don't think that there isn't any formal decision that we should implement IEEE 754-2008 but it would really make sense for many applications of Rust.
The (binary part of the) standard covers
So all of this would need tests, and documentation. And my plan is to compile a suite of tests by slowly going through the standard page-by-page and write the basic conformance tests, then do another (even slower pass) that compiles another list of accuracy tests.
@bjz, @thestinger, @pcwalton, @catamorphism, @graydon and anyone interested: Any inputs on this? Is it a good idea at this point in time?
The text was updated successfully, but these errors were encountered: