Commit 0cf74a18 authored by Brice Videau's avatar Brice Videau
Browse files

Effectively tests that error is has a magnitude of at most x bits with x within [0, 63].

parent aafb314d
Pipeline #13347 passed with stages
in 6 minutes and 14 seconds
......@@ -15,11 +15,11 @@
#define MAX(a, b) (((a) < (b)) ? (a) : (b))
#define ABS(a) (((a) < 0) ? -(a) : (a))
#define check_double(ref, value, ulp) \
#define check_double(ref, value, bits) \
do { \
double diff = ABS(ref - value); \
double diff = ABS((ref) - (value)); \
assert(diff <= MAX(ABS(ref), ABS(value)) * DBL_EPSILON * \
(1 << (ulp - 1))); \
((1 << (bits)) - 1)); \
} while (0)
void init_arrays(size_t memsize, double *a, double *b, double *c)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment