Skip to content

Commit 7f5f016

Browse files
committed
Fix few multiply_add calls with templated versions.
1 parent d8704b4 commit 7f5f016

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

libc/src/math/generic/expm1f.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ LLVM_LIBC_FUNCTION(float, expm1f, (float x)) {
103103
// intermediate results as it is more efficient than using an emulated
104104
// version of FMA.
105105
#if defined(LIBC_TARGET_CPU_HAS_FMA_FLOAT)
106-
return fputil::multiply_add<float>(x, x, x);
106+
return fputil::multiply_add(x, x, x);
107107
#else
108108
double xd = x;
109109
return static_cast<float>(fputil::multiply_add(xd, xd, xd));

libc/src/math/generic/sincosf16_utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ constexpr float SIN_K_PI_OVER_32[64] = {
4040

4141
LIBC_INLINE int32_t range_reduction_sincospif16(float x, float &y) {
4242
float kf = fputil::nearest_integer(x * 32);
43-
y = fputil::multiply_add<float>(x, 32.0, -kf);
43+
y = fputil::multiply_add(x, 32.0f, -kf);
4444

4545
return static_cast<int32_t>(kf);
4646
}

libc/src/math/generic/sincosf_utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ LIBC_INLINE void sincosf_eval(double xd, uint32_t x_abs, double &sin_k,
108108
// => pi * x = (k + y) * pi / 32
109109
static LIBC_INLINE int64_t range_reduction_sincospi(double x, double &y) {
110110
double kd = fputil::nearest_integer(x * 32);
111-
y = fputil::multiply_add<double>(x, 32.0, -kd);
111+
y = fputil::multiply_add(x, 32.0, -kd);
112112

113113
return static_cast<int64_t>(kd);
114114
}

0 commit comments

Comments
 (0)