diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-06-21 06:19:43 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-06-21 06:19:43 +0000 |
commit | 94266d638908a140ef5cdd9b27d2eb367f97249f (patch) | |
tree | e2cb8f4754b0d67846b3be0dfc38c64e83bffd78 /toolchain/libnotimpl/src/math.c | |
parent | 1b14a20c70b78c037ef4bcc6d1edb61ea8b27e68 (diff) |
massive cleanup of toolchain/
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4038 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'toolchain/libnotimpl/src/math.c')
-rw-r--r-- | toolchain/libnotimpl/src/math.c | 68 |
1 files changed, 68 insertions, 0 deletions
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 ); +} + |