We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ee6d9a commit d255996Copy full SHA for d255996
src/libstd/f32.rs
@@ -934,7 +934,7 @@ impl f32 {
934
#[unstable(feature = "lerp", issue = "71015")]
935
#[inline]
936
pub fn lerp(self, upper: f32, pol: f32) -> f32 {
937
- self * (1_f32 - pol) + upper * pol
+ unsafe { intrinsics::fmaf32(self, 1_f32 - pol, upper * pol) }
938
}
939
940
src/libstd/f64.rs
@@ -936,7 +936,7 @@ impl f64 {
pub fn lerp(self, upper: f64, pol: f64) -> f64 {
- self * (1_f64 - pol) + upper * pol
+ unsafe { intrinsics::fmaf64(self, 1_f64 - pol, upper * pol) }
941
942
// Solaris/Illumos requires a wrapper around log, log2, and log10 functions
0 commit comments