summaryrefslogtreecommitdiff
path: root/openwrt/toolchain/libnotimpl/src/math.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-06-21 06:19:43 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-06-21 06:19:43 +0000
commite248cf0f00917eb91b93a3d16c36a4aa544f575c (patch)
tree546646a962e82e608e7feb1e7e1b91fdceb88a6a /openwrt/toolchain/libnotimpl/src/math.c
parent1f20179ce5c9774f17d843070cd39da3f2e62268 (diff)
downloadmtk-20170518-e248cf0f00917eb91b93a3d16c36a4aa544f575c.zip
mtk-20170518-e248cf0f00917eb91b93a3d16c36a4aa544f575c.tar.gz
mtk-20170518-e248cf0f00917eb91b93a3d16c36a4aa544f575c.tar.bz2
massive cleanup of toolchain/
SVN-Revision: 4038
Diffstat (limited to 'openwrt/toolchain/libnotimpl/src/math.c')
-rw-r--r--openwrt/toolchain/libnotimpl/src/math.c68
1 files changed, 68 insertions, 0 deletions
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 );
+}
+