diff --git a/src/math/ceil.c b/src/math/ceil.c index 65c587d..e19e0a5 100644 --- a/src/math/ceil.c +++ b/src/math/ceil.c @@ -33,7 +33,7 @@ int main(void) err++; } d = ulperr(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s ceil(%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/ceilf.c b/src/math/ceilf.c index 4b0a317..2afa703 100644 --- a/src/math/ceilf.c +++ b/src/math/ceilf.c @@ -33,7 +33,7 @@ int main(void) err++; } d = ulperrf(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s ceilf(%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/ceill.c b/src/math/ceill.c index d3a3ed4..23f5b2b 100644 --- a/src/math/ceill.c +++ b/src/math/ceill.c @@ -38,7 +38,7 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s ceill(%La) want %La got %La ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/copysign.c b/src/math/copysign.c index 1f27fd0..829780e 100644 --- a/src/math/copysign.c +++ b/src/math/copysign.c @@ -32,7 +32,7 @@ int main(void) err++; } d = ulperr(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s copysign(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/copysignf.c b/src/math/copysignf.c index a53f6f2..3e86729 100644 --- a/src/math/copysignf.c +++ b/src/math/copysignf.c @@ -32,7 +32,7 @@ int main(void) err++; } d = ulperrf(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s copysignf(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/copysignl.c b/src/math/copysignl.c index 8e21ba1..bdab602 100644 --- a/src/math/copysignl.c +++ b/src/math/copysignl.c @@ -37,7 +37,7 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s copysignl(%La,%La) want %La got %La ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/fabs.c b/src/math/fabs.c index 6a93081..5c156d5 100644 --- a/src/math/fabs.c +++ b/src/math/fabs.c @@ -33,7 +33,7 @@ int main(void) err++; } d = ulperr(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s fabs(%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/fabsf.c b/src/math/fabsf.c index 1dc99b4..11abddf 100644 --- a/src/math/fabsf.c +++ b/src/math/fabsf.c @@ -33,7 +33,7 @@ int main(void) err++; } d = ulperrf(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s fabsf(%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/fabsl.c b/src/math/fabsl.c index df170ea..ac65003 100644 --- a/src/math/fabsl.c +++ b/src/math/fabsl.c @@ -38,7 +38,7 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s fabsl(%La) want %La got %La ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/floor.c b/src/math/floor.c index 1a8f809..6b035cc 100644 --- a/src/math/floor.c +++ b/src/math/floor.c @@ -33,7 +33,7 @@ int main(void) err++; } d = ulperr(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s floor(%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/floorf.c b/src/math/floorf.c index 2808f13..63ee702 100644 --- a/src/math/floorf.c +++ b/src/math/floorf.c @@ -33,7 +33,7 @@ int main(void) err++; } d = ulperrf(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s floorf(%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/floorl.c b/src/math/floorl.c index 42c79de..4c91694 100644 --- a/src/math/floorl.c +++ b/src/math/floorl.c @@ -38,7 +38,7 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s floorl(%La) want %La got %La ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/fma.c b/src/math/fma.c index 4a353f9..88acd08 100644 --- a/src/math/fma.c +++ b/src/math/fma.c @@ -31,7 +31,7 @@ int main(void) err++; } d = ulperr(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s fma(%a,%a,%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/fmaf.c b/src/math/fmaf.c index 20fdb02..05fb09a 100644 --- a/src/math/fmaf.c +++ b/src/math/fmaf.c @@ -31,7 +31,7 @@ int main(void) err++; } d = ulperrf(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s fmaf(%a,%a,%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/fmal.c b/src/math/fmal.c index 801a7a3..6b76bc5 100644 --- a/src/math/fmal.c +++ b/src/math/fmal.c @@ -35,7 +35,7 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s fmal(%La,%La,%La) want %La got %La ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/fmax.c b/src/math/fmax.c index f0ae9a7..9b3a8cf 100644 --- a/src/math/fmax.c +++ b/src/math/fmax.c @@ -32,7 +32,7 @@ int main(void) err++; } d = ulperr(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s fmax(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/fmaxf.c b/src/math/fmaxf.c index 9268786..d90b908 100644 --- a/src/math/fmaxf.c +++ b/src/math/fmaxf.c @@ -32,7 +32,7 @@ int main(void) err++; } d = ulperrf(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s fmaxf(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/fmaxl.c b/src/math/fmaxl.c index 5f4f1f3..f793c0c 100644 --- a/src/math/fmaxl.c +++ b/src/math/fmaxl.c @@ -37,7 +37,7 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s fmaxl(%La,%La) want %La got %La ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/fmin.c b/src/math/fmin.c index d18387d..062dd63 100644 --- a/src/math/fmin.c +++ b/src/math/fmin.c @@ -32,7 +32,7 @@ int main(void) err++; } d = ulperr(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s fmin(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/fminf.c b/src/math/fminf.c index db85a51..b649110 100644 --- a/src/math/fminf.c +++ b/src/math/fminf.c @@ -32,7 +32,7 @@ int main(void) err++; } d = ulperrf(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s fminf(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/fminl.c b/src/math/fminl.c index aca8246..c3c4ffd 100644 --- a/src/math/fminl.c +++ b/src/math/fminl.c @@ -37,7 +37,7 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s fminl(%La,%La) want %La got %La ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/frexp.c b/src/math/frexp.c index 73a415e..bf0eb9a 100644 --- a/src/math/frexp.c +++ b/src/math/frexp.c @@ -33,7 +33,7 @@ int main(void) err++; } d = ulperr(y, p->y, p->dy); - if (!checkulp(d, p->r) || yi != p->i) { + if (!checkcr(y, p->y, p->r) || yi != p->i) { printf("%s:%d: %s frexp(%a) want %a,%lld got %a,%d ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, p->i, y, yi, d, d-p->dy, p->dy); err++; diff --git a/src/math/frexpf.c b/src/math/frexpf.c index 6eefa7d..773540a 100644 --- a/src/math/frexpf.c +++ b/src/math/frexpf.c @@ -33,7 +33,7 @@ int main(void) err++; } d = ulperrf(y, p->y, p->dy); - if (!checkulp(d, p->r) || yi != p->i) { + if (!checkcr(y, p->y, p->r) || yi != p->i) { printf("%s:%d: %s frexpf(%a) want %a,%lld got %a,%d ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, p->i, y, yi, d, d-p->dy, p->dy); err++; diff --git a/src/math/frexpl.c b/src/math/frexpl.c index 275e979..23fffa1 100644 --- a/src/math/frexpl.c +++ b/src/math/frexpl.c @@ -38,7 +38,7 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkulp(d, p->r) || yi != p->i) { + if (!checkcr(y, p->y, p->r) || yi != p->i) { printf("%s:%d: %s frexpl(%La) want %La,%lld got %La,%d ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, p->i, y, yi, d, d-p->dy, p->dy); err++; diff --git a/src/math/nextafter.c b/src/math/nextafter.c index 8c47fb5..73c0844 100644 --- a/src/math/nextafter.c +++ b/src/math/nextafter.c @@ -32,7 +32,7 @@ int main(void) err++; } d = ulperr(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s nextafter(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/nextafterf.c b/src/math/nextafterf.c index 8a8033d..1f9c447 100644 --- a/src/math/nextafterf.c +++ b/src/math/nextafterf.c @@ -32,7 +32,7 @@ int main(void) err++; } d = ulperrf(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s nextafterf(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/nextafterl.c b/src/math/nextafterl.c index 2e9fc06..58737ee 100644 --- a/src/math/nextafterl.c +++ b/src/math/nextafterl.c @@ -37,7 +37,7 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s nextafterl(%La,%La) want %La got %La ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/nexttoward.c b/src/math/nexttoward.c index 9a87d00..1532127 100644 --- a/src/math/nexttoward.c +++ b/src/math/nexttoward.c @@ -37,7 +37,7 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s nexttoward(%La,%La) want %La got %La ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/nexttowardf.c b/src/math/nexttowardf.c index c402015..4b558b9 100644 --- a/src/math/nexttowardf.c +++ b/src/math/nexttowardf.c @@ -37,7 +37,7 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s nexttowardf(%La,%La) want %La got %La ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/nexttowardl.c b/src/math/nexttowardl.c index 5f28334..8625354 100644 --- a/src/math/nexttowardl.c +++ b/src/math/nexttowardl.c @@ -37,7 +37,7 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s nexttowardl(%La,%La) want %La got %La ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/rint.c b/src/math/rint.c index 5cadc61..36ecd2c 100644 --- a/src/math/rint.c +++ b/src/math/rint.c @@ -32,7 +32,7 @@ int main(void) err++; } d = ulperr(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s rint(%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/rintf.c b/src/math/rintf.c index 6fc6f5a..083413b 100644 --- a/src/math/rintf.c +++ b/src/math/rintf.c @@ -32,7 +32,7 @@ int main(void) err++; } d = ulperrf(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s rintf(%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/rintl.c b/src/math/rintl.c index bda368e..e8cd73b 100644 --- a/src/math/rintl.c +++ b/src/math/rintl.c @@ -37,7 +37,7 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s rintl(%La) want %La got %La ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/round.c b/src/math/round.c index a3fd5e9..ca5470b 100644 --- a/src/math/round.c +++ b/src/math/round.c @@ -32,7 +32,7 @@ int main(void) err++; } d = ulperr(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s round(%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/roundf.c b/src/math/roundf.c index d572d94..50c15dd 100644 --- a/src/math/roundf.c +++ b/src/math/roundf.c @@ -32,7 +32,7 @@ int main(void) err++; } d = ulperrf(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s roundf(%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/roundl.c b/src/math/roundl.c index f4fa024..06abed6 100644 --- a/src/math/roundl.c +++ b/src/math/roundl.c @@ -37,7 +37,7 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s roundl(%La) want %La got %La ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/scalbln.c b/src/math/scalbln.c index 0231ceb..2b5124b 100644 --- a/src/math/scalbln.c +++ b/src/math/scalbln.c @@ -32,7 +32,7 @@ int main(void) err++; } d = ulperr(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s scalbln(%a, %lld) want %a got %a, ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->i, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/scalblnf.c b/src/math/scalblnf.c index f80c3fc..659bea4 100644 --- a/src/math/scalblnf.c +++ b/src/math/scalblnf.c @@ -32,7 +32,7 @@ int main(void) err++; } d = ulperrf(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s scalblnf(%a, %lld) want %a got %a, ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->i, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/scalblnl.c b/src/math/scalblnl.c index 71ef477..fc9d0d8 100644 --- a/src/math/scalblnl.c +++ b/src/math/scalblnl.c @@ -37,7 +37,7 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s scalblnl(%La, %lld) want %La got %La ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->i, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/scalbn.c b/src/math/scalbn.c index 99fdc1b..79f6bb2 100644 --- a/src/math/scalbn.c +++ b/src/math/scalbn.c @@ -32,7 +32,7 @@ int main(void) err++; } d = ulperr(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s scalbn(%a, %lld) want %a got %a, ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->i, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/scalbnf.c b/src/math/scalbnf.c index de588a2..8b50e27 100644 --- a/src/math/scalbnf.c +++ b/src/math/scalbnf.c @@ -32,7 +32,7 @@ int main(void) err++; } d = ulperrf(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s scalbnf(%a, %lld) want %a got %a, ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->i, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/scalbnl.c b/src/math/scalbnl.c index 05ad3d9..cb7eb15 100644 --- a/src/math/scalbnl.c +++ b/src/math/scalbnl.c @@ -37,7 +37,7 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s scalbnl(%La, %lld) want %La got %La ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->i, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/sqrt.c b/src/math/sqrt.c index 29ff800..dae1e20 100644 --- a/src/math/sqrt.c +++ b/src/math/sqrt.c @@ -33,7 +33,7 @@ int main(void) err++; } d = ulperr(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s sqrt(%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/sqrtf.c b/src/math/sqrtf.c index 6c3fb04..fb910d0 100644 --- a/src/math/sqrtf.c +++ b/src/math/sqrtf.c @@ -33,7 +33,7 @@ int main(void) err++; } d = ulperrf(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s sqrtf(%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/sqrtl.c b/src/math/sqrtl.c index 24d5b59..ab22eac 100644 --- a/src/math/sqrtl.c +++ b/src/math/sqrtl.c @@ -38,7 +38,7 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s sqrtl(%La) want %La got %La ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/trunc.c b/src/math/trunc.c index 49c50e0..071695b 100644 --- a/src/math/trunc.c +++ b/src/math/trunc.c @@ -32,7 +32,7 @@ int main(void) err++; } d = ulperr(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s trunc(%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/truncf.c b/src/math/truncf.c index 1df8781..739a000 100644 --- a/src/math/truncf.c +++ b/src/math/truncf.c @@ -32,7 +32,7 @@ int main(void) err++; } d = ulperrf(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s truncf(%a) want %a got %a ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/truncl.c b/src/math/truncl.c index 11125b2..a3b3a7a 100644 --- a/src/math/truncl.c +++ b/src/math/truncl.c @@ -37,7 +37,7 @@ int main(void) err++; } d = ulperrl(y, p->y, p->dy); - if (!checkulp(d, p->r)) { + if (!checkcr(y, p->y, p->r)) { printf("%s:%d: %s truncl(%La) want %La got %La ulperr %.3f = %a + %a\n", p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); err++; diff --git a/src/math/util.h b/src/math/util.h index 875203b..d84b0e3 100644 --- a/src/math/util.h +++ b/src/math/util.h @@ -116,3 +116,10 @@ static int checkulp(float d, int r) return 1; } +static int checkcr(long double y, long double ywant, int r) +{ + if (isnan(ywant)) + return isnan(y); + return y == ywant; +} +