summaryrefslogtreecommitdiffstats
path: root/lib/msun/src
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2008-01-18 21:42:46 +0000
committerdas <das@FreeBSD.org>2008-01-18 21:42:46 +0000
commit0bde705160bc5c662c6cb5b98817cbde6d1b25a3 (patch)
tree119862a2436be1bd1733a6822b10f1815342e085 /lib/msun/src
parent764b848f5d99ac0e820c624c88232a2c6378a17d (diff)
downloadFreeBSD-src-0bde705160bc5c662c6cb5b98817cbde6d1b25a3.zip
FreeBSD-src-0bde705160bc5c662c6cb5b98817cbde6d1b25a3.tar.gz
Implement exp2l(). There is one version for machines with 80-bit
long doubles (i386, amd64, ia64) and one for machines with 128-bit long doubles (sparc64). Other platforms use the double version. I've only done runtime testing on i386. Thanks to bde@ for helpful discussions and bugfixes.
Diffstat (limited to 'lib/msun/src')
-rw-r--r--lib/msun/src/math.h2
-rw-r--r--lib/msun/src/s_exp2.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/msun/src/math.h b/lib/msun/src/math.h
index 07bbd57..41545eb 100644
--- a/lib/msun/src/math.h
+++ b/lib/msun/src/math.h
@@ -408,7 +408,9 @@ long double coshl(long double);
long double cosl(long double);
long double erfcl(long double);
long double erfl(long double);
+#endif
long double exp2l(long double);
+#if 0
long double expl(long double);
long double expm1l(long double);
#endif
diff --git a/lib/msun/src/s_exp2.c b/lib/msun/src/s_exp2.c
index 8dce338..6593a50 100644
--- a/lib/msun/src/s_exp2.c
+++ b/lib/msun/src/s_exp2.c
@@ -27,6 +27,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <float.h>
+
#include "math.h"
#include "math_private.h"
@@ -387,3 +389,7 @@ exp2(double x)
return (r * twom1000);
}
}
+
+#if (LDBL_MANT_DIG == 53)
+__weak_reference(exp2, exp2l);
+#endif
OpenPOWER on IntegriCloud