| 18 | } |
| 19 | |
| 20 | void print_number(double x) { |
| 21 | double y = x; |
| 22 | int c = 0; |
| 23 | if (y < 0.0) { |
| 24 | y = -y; |
| 25 | } |
| 26 | while (y < 100.0) { |
| 27 | y *= 10.0; |
| 28 | c++; |
| 29 | } |
| 30 | printf("%.*f", c, x); |
| 31 | } |
| 32 | |
| 33 | void run_benchmark(char *name, void (*benchmark)(void*), void (*setup)(void*), void (*teardown)(void*), void* data, int count, int iter) { |
| 34 | int i; |