diff options
author | rpj <rpj> | 2003-08-13 15:10:53 +0000 |
---|---|---|
committer | rpj <rpj> | 2003-08-13 15:10:53 +0000 |
commit | 414f4bd7e70d94025576d9264c86da63c506f6ca (patch) | |
tree | ed0d8de3bd5fbccd0191b3e6cc1e0d86ebe8ff97 /tests/eyal1.c | |
parent | 614c09bf607cf77c70c7435cd615c9f8b684bc5e (diff) |
Bug fixes plus adaptation to current MinGW/MsysDTK environment. Changes to tests/benchmarks.
Diffstat (limited to 'tests/eyal1.c')
-rw-r--r-- | tests/eyal1.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/eyal1.c b/tests/eyal1.c index 72a127f..2890207 100644 --- a/tests/eyal1.c +++ b/tests/eyal1.c @@ -124,15 +124,21 @@ static double waste_time (int n) { int i; - double f; + double f, g, h, s; - f = rand (); + s = 0; + /* + * Useless work. + */ for (i = n*100; i > 0; --i) { - f = 2 * f * f / (f * f); + f = rand (); + g = rand (); + h = rand (); + s += 2 * f * g / (h != 0 ? (h * h) : 1); } - return f; + return s; } static int |