Skip to content

Commit

Permalink
Fix fma test on MinGW
Browse files Browse the repository at this point in the history
prtest:full
  • Loading branch information
alexcrichton committed Jan 6, 2025
1 parent 9e97260 commit 5574cee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/math/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,10 @@ impl WasmFloat for f64 {
}
#[inline]
fn mul_add(self, b: f64, c: f64) -> f64 {
// The MinGW implementation of `fma` differs from other platforms, so
// favor `libm` there instead.
#[cfg(feature = "std")]
if true {
if !(cfg!(windows) && cfg!(target_env = "gnu")) {
return self.mul_add(b, c);
}
libm::fma(self, b, c)
Expand Down

0 comments on commit 5574cee

Please sign in to comment.