From d25d39b7ef9440165a077fe1367b7d662022397c Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Mon, 6 Oct 2008 10:24:41 +0000 Subject: - implement log2() --- libm/Makefile.in | 2 +- libm/w_log2.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 libm/w_log2.c 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 + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ +#include +#include "math_private.h" + +double log2 (double d) +{ + return __ieee754_log2 (d); +} +libm_hidden_def(log2) -- cgit v1.2.3