summaryrefslogtreecommitdiffstats
path: root/lib/libm/src/e_exp.c
diff options
context:
space:
mode:
authormartynas <martynas@openbsd.org>2011-07-06 00:02:42 +0000
committermartynas <martynas@openbsd.org>2011-07-06 00:02:42 +0000
commit49393c004c040ee201e6408db68882c3fe4cb110 (patch)
treef3298ab7f1009e5bcf7f59709937ab1bf7c9db6e /lib/libm/src/e_exp.c
parenta short note about PR_DEBUGCHK (diff)
downloadwireguard-openbsd-49393c004c040ee201e6408db68882c3fe4cb110.tar.xz
wireguard-openbsd-49393c004c040ee201e6408db68882c3fe4cb110.zip
Finalize work on the math library. It's time to do this monster
commit, and deal with problems (if any) in tree. Note that this adds the following functions. Ports with hacks might need adjustments. nexttoward(3), fma(3), nexttowardf(3), fmaf(3), acoshl(3), asinhl(3), atanhl(3), coshl(3), sinhl(3), tanhl(3), expl(3), expm1l(3), logl(3), log10l(3), log1pl(3), log2l(3), modfl(3), cbrtl(3), hypotl(3), powl(3), erfl(3), erfcl(3), lgammal(3), tgammal(3), ceill(3), floorl(3), lrintl(3), llrintl(3), roundl(3), lroundl(3), llroundl(3), truncl(3), fmodl(3), remainderl(3), remquol(3), nextafterl(3), nexttowardl(3), fmal(3). With this commit, our library implements all functionality required by C99. Documentation bits will follow.
Diffstat (limited to 'lib/libm/src/e_exp.c')
-rw-r--r--lib/libm/src/e_exp.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/libm/src/e_exp.c b/lib/libm/src/e_exp.c
index 23c1d2888b5..a9a4fcb40b8 100644
--- a/lib/libm/src/e_exp.c
+++ b/lib/libm/src/e_exp.c
@@ -10,6 +10,8 @@
* ====================================================
*/
+/* LINTLIBRARY */
+
/* exp(x)
* Returns the exponential of x.
*
@@ -73,7 +75,10 @@
* to produce the hexadecimal values shown.
*/
-#include "math.h"
+#include <sys/cdefs.h>
+#include <float.h>
+#include <math.h>
+
#include "math_private.h"
static const double
@@ -153,3 +158,12 @@ exp(double x) /* default IEEE double exp */
return y*twom1000;
}
}
+
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+long double expl(long double);
+#else /* lint */
+__weak_alias(expl, exp);
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */