summaryrefslogtreecommitdiffstats
path: root/lib/msun/src/s_tanh.c
diff options
context:
space:
mode:
authortijl <tijl@FreeBSD.org>2014-09-18 15:10:22 +0000
committertijl <tijl@FreeBSD.org>2014-09-18 15:10:22 +0000
commit680c2860fd7f159f4529ca45a9ca52b4a7ba264b (patch)
tree26b81d212dd6cf440026f609ed3bcfcf488c6bdb /lib/msun/src/s_tanh.c
parentadb4c6080c0d40a450861f8ad12a1634fc813dc4 (diff)
downloadFreeBSD-src-680c2860fd7f159f4529ca45a9ca52b4a7ba264b.zip
FreeBSD-src-680c2860fd7f159f4529ca45a9ca52b4a7ba264b.tar.gz
MFC r257770 r257818 r257823 r260066 r260067 r260089 r260145 r268587 r268588
r268589 r268590 r268593 r268597 r269758 r270845 r270847 r270893 r270932 r270947 r271147 Merge libm work by kargl, bde and das from the past few months. Besides optimisations and small bug fixes this includes new implementations for C99 functions expl, coshl, sinhl, tanhl, erfl and erfcl. Approved by: re (kib)
Diffstat (limited to 'lib/msun/src/s_tanh.c')
-rw-r--r--lib/msun/src/s_tanh.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/msun/src/s_tanh.c b/lib/msun/src/s_tanh.c
index 96e3565..6d26c69 100644
--- a/lib/msun/src/s_tanh.c
+++ b/lib/msun/src/s_tanh.c
@@ -37,10 +37,13 @@ __FBSDID("$FreeBSD$");
* only tanh(0)=0 is exact for finite argument.
*/
+#include <float.h>
+
#include "math.h"
#include "math_private.h"
-static const double one = 1.0, two = 2.0, tiny = 1.0e-300, huge = 1.0e300;
+static const volatile double tiny = 1.0e-300;
+static const double one = 1.0, two = 2.0, huge = 1.0e300;
double
tanh(double x)
@@ -75,3 +78,7 @@ tanh(double x)
}
return (jx>=0)? z: -z;
}
+
+#if (LDBL_MANT_DIG == 53)
+__weak_reference(tanh, tanhl);
+#endif
OpenPOWER on IntegriCloud