summaryrefslogtreecommitdiffstats
path: root/lib/libm/src/e_pow.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_pow.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_pow.c')
-rw-r--r--lib/libm/src/e_pow.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/libm/src/e_pow.c b/lib/libm/src/e_pow.c
index 938b37cc798..e342119e9a4 100644
--- a/lib/libm/src/e_pow.c
+++ b/lib/libm/src/e_pow.c
@@ -10,6 +10,8 @@
* ====================================================
*/
+/* LINTLIBRARY */
+
/* pow(x,y) return x**y
*
* n
@@ -55,7 +57,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
@@ -295,3 +300,12 @@ pow(double x, double y)
else SET_HIGH_WORD(z,j);
return s*z;
}
+
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+long double powl(long double, long double);
+#else /* lint */
+__weak_alias(powl, pow);
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */