diff options
author | Szabolcs Nagy <nsz@port70.net> | 2013-10-07 18:41:03 +0000 |
---|---|---|
committer | Szabolcs Nagy <nsz@port70.net> | 2013-10-07 18:41:03 +0000 |
commit | 4b539a826b64d846d02a6cde9d6bcff22472af88 (patch) | |
tree | 0f67979124f09682a496c36ab85520528f72f983 /src/math/acoshf.c | |
parent | 551da2c1916e3166a0562ac6f2e76fd46781f3d7 (diff) | |
download | musl-4b539a826b64d846d02a6cde9d6bcff22472af88.tar.gz musl-4b539a826b64d846d02a6cde9d6bcff22472af88.tar.xz musl-4b539a826b64d846d02a6cde9d6bcff22472af88.zip |
math: use sqrtl if FLT_EVAL_METHOD==2 in acosh and acoshf
this makes acosh slightly more precise around 1.0 on i386
Diffstat (limited to 'src/math/acoshf.c')
-rw-r--r-- | src/math/acoshf.c | 8 |
1 files changed, 8 insertions, 0 deletions
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) { |