fio: use LDFLAGS when linking dynamic engines
[fio.git] / t / ieee754.c
1 #include <stdio.h>
2 #include "../lib/ieee754.h"
3
4 static double values[] = { -17.23, 17.23, 123.4567, 98765.4321,
5         3.14159265358979323, 0.0 };
6
7 int main(int argc, char *argv[])
8 {
9         uint64_t i;
10         double f, delta;
11         int j, differences = 0;
12
13         j = 0;
14         do {
15                 i = fio_double_to_uint64(values[j]);
16                 f = fio_uint64_to_double(i);
17                 delta = values[j] - f;
18                 printf("%26.20lf -> %26.20lf, delta = %26.20lf\n", values[j],
19                         f, delta);
20                 if (f != values[j])
21                         differences++;
22                 j++;
23         } while (values[j] != 0.0);
24
25         return differences;
26 }