summaryrefslogtreecommitdiff
path: root/libm
diff options
context:
space:
mode:
Diffstat (limited to 'libm')
-rw-r--r--libm/Makefile.in2
-rw-r--r--libm/w_log2.c14
2 files changed, 15 insertions, 1 deletions
diff --git a/libm/Makefile.in b/libm/Makefile.in
index 7e72d8add..48d5c4778 100644
--- a/libm/Makefile.in
+++ b/libm/Makefile.in
@@ -69,7 +69,7 @@ libm_CSRC := \
s_tanh.c s_trunc.c w_acos.c w_acosh.c w_asin.c w_atan2.c w_atanh.c \
w_cabs.c w_cosh.c w_drem.c w_exp.c w_fmod.c w_gamma.c \
w_hypot.c w_j0.c w_j1.c w_jn.c w_lgamma.c w_lgamma_r.c \
- w_log.c w_log10.c w_pow.c w_remainder.c w_scalb.c w_sinh.c \
+ w_log.c w_log2.c w_log10.c w_pow.c w_remainder.c w_scalb.c w_sinh.c \
w_sqrt.c nan.c carg.c s_llrint.c \
s_fpclassify.c s_fpclassifyf.c s_signbit.c s_signbitf.c \
s_isnan.c s_isnanf.c s_isinf.c s_isinff.c s_finitef.c \
diff --git a/libm/w_log2.c b/libm/w_log2.c
new file mode 100644
index 000000000..ec274f761
--- /dev/null
+++ b/libm/w_log2.c
@@ -0,0 +1,14 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Copyright (C) 2008 by Bernhard Reutner-Fischer <uclibc@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <math.h>
+#include "math_private.h"
+
+double log2 (double d)
+{
+ return __ieee754_log2 (d);
+}
+libm_hidden_def(log2)