From e248cf0f00917eb91b93a3d16c36a4aa544f575c Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 21 Jun 2006 06:19:43 +0000 Subject: massive cleanup of toolchain/ SVN-Revision: 4038 --- openwrt/toolchain/libnotimpl/src/math.c | 68 +++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 openwrt/toolchain/libnotimpl/src/math.c (limited to 'openwrt/toolchain/libnotimpl/src') diff --git a/openwrt/toolchain/libnotimpl/src/math.c b/openwrt/toolchain/libnotimpl/src/math.c new file mode 100644 index 0000000..a16ea74 --- /dev/null +++ b/openwrt/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.1