diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-06-21 06:19:43 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-06-21 06:19:43 +0000 |
commit | 13078b79e500d9cb914b29c9d6a8a54185fe213c (patch) | |
tree | e2cb8f4754b0d67846b3be0dfc38c64e83bffd78 /toolchain/libnotimpl/src/math.c | |
parent | 4da6c416ff6122d03e5f3ce6808e15e761e91564 (diff) | |
download | upstream-13078b79e500d9cb914b29c9d6a8a54185fe213c.tar.gz upstream-13078b79e500d9cb914b29c9d6a8a54185fe213c.tar.bz2 upstream-13078b79e500d9cb914b29c9d6a8a54185fe213c.zip |
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 ); +} + |