summaryrefslogtreecommitdiff
path: root/libc/src/math/generic/acoshf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libc/src/math/generic/acoshf.cpp')
-rw-r--r--libc/src/math/generic/acoshf.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/src/math/generic/acoshf.cpp b/libc/src/math/generic/acoshf.cpp
index a4a75a7b0438..9422ec63e1ce 100644
--- a/libc/src/math/generic/acoshf.cpp
+++ b/libc/src/math/generic/acoshf.cpp
@@ -66,8 +66,8 @@ LLVM_LIBC_FUNCTION(float, acoshf, (float x)) {
double x_d = static_cast<double>(x);
// acosh(x) = log(x + sqrt(x^2 - 1))
- return static_cast<float>(
- log_eval(x_d + fputil::sqrt(fputil::multiply_add(x_d, x_d, -1.0))));
+ return static_cast<float>(log_eval(
+ x_d + fputil::sqrt<double>(fputil::multiply_add(x_d, x_d, -1.0))));
}
} // namespace LIBC_NAMESPACE