musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/math/acosh.c 5
-rw-r--r--src/math/acoshf.c 8
2 files changed, 13 insertions, 0 deletions
diff --git a/src/math/acosh.c b/src/math/acosh.c
index 4ce9b3d1..badbf908 100644
--- a/src/math/acosh.c
+++ b/src/math/acosh.c
@@ -1,5 +1,10 @@
#include "libm.h"
+#if FLT_EVAL_METHOD==2
+#undef sqrt
+#define sqrt sqrtl
+#endif
+
/* acosh(x) = log(x + sqrt(x*x-1)) */
double acosh(double x)
{
diff --git a/src/math/acoshf.c b/src/math/acoshf.c
index 16550f19..8a4ec4d5 100644
--- a/src/math/acoshf.c
+++ b/src/math/acoshf.c
@@ -1,5 +1,13 @@
#include "libm.h"
+#if FLT_EVAL_METHOD==2
+#undef sqrtf
+#define sqrtf sqrtl
+#elif FLT_EVAL_METHOD==1
+#undef sqrtf
+#define sqrtf sqrt
+#endif
+
/* acosh(x) = log(x + sqrt(x*x-1)) */
float acoshf(float x)
{
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月08日 00:45:10 +0000

AltStyle によって変換されたページ (->オリジナル) /