From 94266d638908a140ef5cdd9b27d2eb367f97249f Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 21 Jun 2006 06:19:43 +0000 Subject: massive cleanup of toolchain/ git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4038 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- toolchain/libnotimpl/src/math.c | 68 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 toolchain/libnotimpl/src/math.c (limited to 'toolchain/libnotimpl/src/math.c') diff --git a/toolchain/libnotimpl/src/math.c b/toolchain/libnotimpl/src/math.c new file mode 100644 index 0000000000..a16ea740ea --- /dev/null +++ b/toolchain/libnotimpl/src/math.c @@ -0,0 +1,68 @@ +/* vi: set sw=4 ts=4: */ + +#include "math.h" + + +/* cosf for uClibc + * + * wrapper for cos(x) + */ + +#ifdef __STDC__ + float cosf(float x) +#else + float cosf(x) + float x; +#endif +{ + return (float) cos( (double)x ); +} + + +/* sinf for uClibc + * + * wrapper for sin(x) + */ + +#ifdef __STDC__ + float sinf(float x) +#else + float sinf(x) + float x; +#endif +{ + return (float) sin( (double)x ); +} + + +/* ceilf for uClibc + * + * wrapper for ceil(x) + */ + +#ifdef __STDC__ + float ceilf(float x) +#else + float rintf(x) + float x; +#endif +{ + return (float) ceil( (double)x ); +} + + +/* rintf for uClibc + * + * wrapper for rint(x) + */ + +#ifdef __STDC__ + float rintf(float x) +#else + float rintf(x) + float x; +#endif +{ + return (float) sin( (double)x ); +} + -- cgit v1.2.3 From a22828ce2bdad612bab9f9098a0d1bcec4ce37bf Mon Sep 17 00:00:00 2001 From: nico Date: Sat, 7 Oct 2006 09:59:42 +0000 Subject: fix typo git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4941 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- toolchain/libnotimpl/src/math.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toolchain/libnotimpl/src/math.c') diff --git a/toolchain/libnotimpl/src/math.c b/toolchain/libnotimpl/src/math.c index a16ea740ea..5bfcb9532e 100644 --- a/toolchain/libnotimpl/src/math.c +++ b/toolchain/libnotimpl/src/math.c @@ -43,7 +43,7 @@ #ifdef __STDC__ float ceilf(float x) #else - float rintf(x) + float ceilf(x) float x; #endif { -- cgit v1.2.3