projects
/
libc-test
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5348e73
)
add math/modf benchmark
author
nsz
<nsz@port70.net>
Wed, 28 Mar 2012 23:59:51 +0000
(
01:59
+0200)
committer
nsz
<nsz@port70.net>
Wed, 28 Mar 2012 23:59:51 +0000
(
01:59
+0200)
src/math/modf.c
patch
|
blob
|
history
diff --git
a/src/math/modf.c
b/src/math/modf.c
index
43b8657
..
8a5cc95
100644
(file)
--- a/
src/math/modf.c
+++ b/
src/math/modf.c
@@
-88,3
+88,21
@@
void test_modfl()
error("modfl(%La) want %La %La got %La %La\n", tl[i].x, tl[i].yf, tl[i].yi, yf, yi);
}
}
+
+void bench_modf_small(int N)
+{
+ int i;
+ volatile double yf, yi;
+
+ for (i = 0; i < N; i++)
+ yf = modf(1234.5678, &yi);
+}
+
+void bench_modf_large(int N)
+{
+ int i;
+ volatile double yf, yi;
+
+ for (i = 0; i < N; i++)
+ yf = modf(1.2345678e300, &yi);
+}