kumquat-buildroot/toolchain/uClibc/uClibc-0.9.30.2-libm-enable-log2f-and-exp2f.patch
Peter Korsgaard 43ffd946ad toolchain/uClibc: additional 0.9.30.2 patches
Everything on the 0_9_30 branch since the release (0.9.30.3 to be)

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-02-22 22:05:41 +01:00

71 lines
2.4 KiB
Diff

From 956a0087e282e53ba9c085dbbc469391f7234944 Mon Sep 17 00:00:00 2001
From: Aurelien Jacobs <aurel@gnuage.org>
Date: Thu, 4 Feb 2010 09:31:40 -0800
Subject: [PATCH 10/15] libm: enable log2f and exp2f
Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
---
libm/float_wrappers.c | 4 ++--
test/math/compile_test.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libm/float_wrappers.c b/libm/float_wrappers.c
index dc315e7..b7317a1 100644
--- a/libm/float_wrappers.c
+++ b/libm/float_wrappers.c
@@ -15,12 +15,10 @@
/* For the time being, do _NOT_ implement these functions
* that are defined by SuSv3 */
-#undef L_exp2f /*float exp2f(float);*/
#undef L_fdimf /*float fdimf(float, float);*/
#undef L_fmaf /*float fmaf(float, float, float);*/
#undef L_fmaxf /*float fmaxf(float, float);*/
#undef L_fminf /*float fminf(float, float);*/
-#undef L_log2f /*float log2f(float);*/
#undef L_nearbyintf /*float nearbyintf(float);*/
#undef L_nexttowardf /*float nexttowardf(float, long double);*/
#undef L_remquof /*float remquof(float, float, int *);*/
@@ -43,6 +41,7 @@ float cosf(float);
float coshf(float);
float erfcf(float);
float erff(float);
+float exp2f(float);
float expf(float);
float expm1f(float);
float fabsf(float);
@@ -56,6 +55,7 @@ float lgammaf(float);
long long llroundf(float);
float log10f(float);
float log1pf(float);
+float log2f(float);
float logbf(float);
float logf(float);
long lroundf(float);
diff --git a/test/math/compile_test.c b/test/math/compile_test.c
index 9990520..ee5e2e3 100644
--- a/test/math/compile_test.c
+++ b/test/math/compile_test.c
@@ -18,7 +18,7 @@ r += cosf(float_x);
r += coshf(float_x);
r += erfcf(float_x);
r += erff(float_x);
-/*r += exp2f(float_x); - uclibc does not have it (yet?) */
+r += exp2f(float_x);
r += expf(float_x);
r += expm1f(float_x);
r += fabsf(float_x);
@@ -38,7 +38,7 @@ r += llrintf(float_x);
r += llroundf(float_x);
r += log10f(float_x);
r += log1pf(float_x);
-/*r += log2f(float_x); - uclibc does not have it (yet?) */
+r += log2f(float_x);
r += logbf(float_x);
r += logf(float_x);
r += lrintf(float_x);
--
1.6.6.1