Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't use f64 shims for f32 cmath functions on non 32-bit x86 MSVC #68033
One hesitation I have is that on for example x86_64 MSVC some of these functions give slightly different results which look like they're actually less accurate. That makes this technically a breaking change but I don't know if we have strong stability or accuracy guarantees for these functions.
dtolnay left a comment
Looks good to me. Thanks!
It looks like the existing workaround was added in #26601 before the LLVM fix to support Windows XP. At some point we should drop XP support and remove the remaining shims... https://internals.rust-lang.org/t/consider-dropping-support-for-windows-xp/8745
Regarding accuracy, the comment in cmath.rs acknowledges that the f64 promoted operations do not exactly match the f32 operations but were only "accurate enough for now".
Rollup of 4 pull requests Successful merges: - #68033 (Don't use f64 shims for f32 cmath functions on non 32-bit x86 MSVC) - #68153 (resolve: Point at the private item definitions in privacy errors) - #68244 (Enable leak sanitizer test case) - #68255 (Remove unused auxiliary file that was replaced with rust_test_helpers) Failed merges: r? @ghost
Rollup of 5 pull requests Successful merges: - #68033 (Don't use f64 shims for f32 cmath functions on non 32-bit x86 MSVC) - #68244 (Enable leak sanitizer test case) - #68255 (Remove unused auxiliary file that was replaced with rust_test_helpers) - #68263 (rustdoc: HTML escape codeblocks which fail syntax highlighting) - #68274 (remove dead code) Failed merges: r? @ghost
Just to be clear, these shims were added to support the
The shims are still needed even in 32-bit x86 Windows 10 so we won't be able to remove them unfortunately.