projects
/
openwrt
/
svn-archive
/
packages.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c7bf2e
)
added roundl to libnotimpl
author
John Crispin
<john@openwrt.org>
Tue, 9 Oct 2007 20:02:04 +0000
(20:02 +0000)
committer
John Crispin
<john@openwrt.org>
Tue, 9 Oct 2007 20:02:04 +0000
(20:02 +0000)
SVN-Revision: 9221
libs/libnotimpl/src/math.c
patch
|
blob
|
history
diff --git
a/libs/libnotimpl/src/math.c
b/libs/libnotimpl/src/math.c
index 096676371c178ba618fb4d2842249f15e2eae216..66bcb6292f195da58edd621c87f899c99123f9b7 100644
(file)
--- a/
libs/libnotimpl/src/math.c
+++ b/
libs/libnotimpl/src/math.c
@@
-96,3
+96,18
@@
return (float) expf( (double)x );
}
+/* lround for uClibc
+ *
+ * wrapper for lround(x)
+ */
+
+#ifdef __STDC__
+ long lround(double x)
+#else
+ long lround(x)
+ double x;
+#endif
+{
+ return (long) ((x - ((long)x) >= 0.5f) ? (((long)x) + 1) : ((long)x));
+}
+