Skip to content

Commit 1acc2a5

Browse files
committed
Fix mul_sub to use simd_fneg intrinsic
1 parent fbe8195 commit 1acc2a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/std_float/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pub trait StdFloat: Sealed + Sized {
6666
#[inline]
6767
#[must_use = "method returns a new vector and does not mutate the original value"]
6868
fn mul_sub(self, a: Self, b: Self) -> Self {
69-
unsafe { intrinsics::simd_fma(self, a, -b) }
69+
unsafe { intrinsics::simd_fma(self, a, intrinsics::simd_fneg(b)) }
7070
}
7171

7272
/// Produces a vector where every element has the square root value

0 commit comments

Comments
 (0)