From 457b0dbfc1d72080f6ba9fe47cd712e0f090732a Mon Sep 17 00:00:00 2001 From: nsz Date: Sun, 7 Oct 2012 21:20:43 +0200 Subject: [PATCH] math: print file:line in the error msg, fix nearbyint tests --- src/math/acos.c | 7 ++++--- src/math/acosf.c | 7 ++++--- src/math/acosh.c | 7 ++++--- src/math/acoshf.c | 7 ++++--- src/math/acoshl.c | 7 ++++--- src/math/acosl.c | 7 ++++--- src/math/asin.c | 7 ++++--- src/math/asinf.c | 7 ++++--- src/math/asinh.c | 7 ++++--- src/math/asinhf.c | 7 ++++--- src/math/asinhl.c | 7 ++++--- src/math/asinl.c | 7 ++++--- src/math/atan.c | 7 ++++--- src/math/atan2.c | 7 ++++--- src/math/atan2f.c | 7 ++++--- src/math/atan2l.c | 7 ++++--- src/math/atanf.c | 7 ++++--- src/math/atanh.c | 7 ++++--- src/math/atanhf.c | 7 ++++--- src/math/atanhl.c | 7 ++++--- src/math/atanl.c | 7 ++++--- src/math/cbrt.c | 7 ++++--- src/math/cbrtf.c | 7 ++++--- src/math/cbrtl.c | 7 ++++--- src/math/ceil.c | 7 ++++--- src/math/ceilf.c | 7 ++++--- src/math/ceill.c | 7 ++++--- src/math/copysign.c | 7 ++++--- src/math/copysignf.c | 7 ++++--- src/math/copysignl.c | 7 ++++--- src/math/cos.c | 7 ++++--- src/math/cosf.c | 7 ++++--- src/math/cosh.c | 7 ++++--- src/math/coshf.c | 7 ++++--- src/math/coshl.c | 7 ++++--- src/math/cosl.c | 7 ++++--- src/math/erf.c | 7 ++++--- src/math/erfc.c | 7 ++++--- src/math/erfcf.c | 7 ++++--- src/math/erfcl.c | 7 ++++--- src/math/erff.c | 7 ++++--- src/math/erfl.c | 7 ++++--- src/math/exp.c | 7 ++++--- src/math/exp10.c | 7 ++++--- src/math/exp10f.c | 7 ++++--- src/math/exp10l.c | 7 ++++--- src/math/exp2.c | 7 ++++--- src/math/exp2f.c | 7 ++++--- src/math/exp2l.c | 7 ++++--- src/math/expf.c | 7 ++++--- src/math/expl.c | 7 ++++--- src/math/expm1.c | 7 ++++--- src/math/expm1f.c | 7 ++++--- src/math/expm1l.c | 7 ++++--- src/math/fabs.c | 7 ++++--- src/math/fabsf.c | 7 ++++--- src/math/fabsl.c | 7 ++++--- src/math/fdim.c | 7 ++++--- src/math/fdimf.c | 7 ++++--- src/math/fdiml.c | 7 ++++--- src/math/floor.c | 7 ++++--- src/math/floorf.c | 7 ++++--- src/math/floorl.c | 7 ++++--- src/math/fmax.c | 7 ++++--- src/math/fmaxf.c | 7 ++++--- src/math/fmaxl.c | 7 ++++--- src/math/fmin.c | 7 ++++--- src/math/fminf.c | 7 ++++--- src/math/fminl.c | 7 ++++--- src/math/fmod.c | 7 ++++--- src/math/fmodf.c | 7 ++++--- src/math/fmodl.c | 7 ++++--- src/math/gen/mp.c | 6 +++--- src/math/gen/template/d_d.c | 7 ++++--- src/math/gen/template/dd_d.c | 7 ++++--- src/math/gen/template/f_f.c | 7 ++++--- src/math/gen/template/ff_f.c | 7 ++++--- src/math/gen/template/l_l.c | 7 ++++--- src/math/gen/template/ll_l.c | 7 ++++--- src/math/hypot.c | 7 ++++--- src/math/hypotf.c | 7 ++++--- src/math/hypotl.c | 7 ++++--- src/math/j0.c | 7 ++++--- src/math/j0f.c | 7 ++++--- src/math/j1.c | 7 ++++--- src/math/j1f.c | 7 ++++--- src/math/log.c | 7 ++++--- src/math/log10.c | 7 ++++--- src/math/log10f.c | 7 ++++--- src/math/log10l.c | 7 ++++--- src/math/log1p.c | 7 ++++--- src/math/log1pf.c | 7 ++++--- src/math/log1pl.c | 7 ++++--- src/math/log2.c | 7 ++++--- src/math/log2f.c | 7 ++++--- src/math/log2l.c | 7 ++++--- src/math/logb.c | 7 ++++--- src/math/logbf.c | 7 ++++--- src/math/logbl.c | 7 ++++--- src/math/logf.c | 7 ++++--- src/math/logl.c | 7 ++++--- src/math/nearbyint.c | 7 ++++--- src/math/nearbyintf.c | 7 ++++--- src/math/nearbyintl.c | 7 ++++--- src/math/nextafter.c | 7 ++++--- src/math/nextafterf.c | 7 ++++--- src/math/nextafterl.c | 7 ++++--- src/math/nexttowardl.c | 7 ++++--- src/math/pow.c | 7 ++++--- src/math/pow10.c | 7 ++++--- src/math/pow10f.c | 7 ++++--- src/math/pow10l.c | 7 ++++--- src/math/powf.c | 7 ++++--- src/math/powl.c | 7 ++++--- src/math/remainder.c | 7 ++++--- src/math/remainderf.c | 7 ++++--- src/math/remainderl.c | 7 ++++--- src/math/rint.c | 7 ++++--- src/math/rintf.c | 7 ++++--- src/math/rintl.c | 7 ++++--- src/math/round.c | 7 ++++--- src/math/roundf.c | 7 ++++--- src/math/roundl.c | 7 ++++--- src/math/sanity/nearbyint.h | 20 ++++++++++---------- src/math/sanity/nearbyintf.h | 20 ++++++++++---------- src/math/sanity/nearbyintl.h | 20 ++++++++++---------- src/math/scalb.c | 7 ++++--- src/math/scalbf.c | 7 ++++--- src/math/sin.c | 7 ++++--- src/math/sinf.c | 7 ++++--- src/math/sinh.c | 7 ++++--- src/math/sinhf.c | 7 ++++--- src/math/sinhl.c | 7 ++++--- src/math/sinl.c | 7 ++++--- src/math/sqrt.c | 7 ++++--- src/math/sqrtf.c | 7 ++++--- src/math/sqrtl.c | 7 ++++--- src/math/tan.c | 7 ++++--- src/math/tanf.c | 7 ++++--- src/math/tanh.c | 7 ++++--- src/math/tanhf.c | 7 ++++--- src/math/tanhl.c | 7 ++++--- src/math/tanl.c | 7 ++++--- src/math/tgamma.c | 7 ++++--- src/math/tgammaf.c | 7 ++++--- src/math/tgammal.c | 7 ++++--- src/math/trunc.c | 7 ++++--- src/math/truncf.c | 7 ++++--- src/math/truncl.c | 7 ++++--- src/math/y0.c | 7 ++++--- src/math/y0f.c | 7 ++++--- src/math/y1.c | 7 ++++--- src/math/y1f.c | 7 ++++--- 153 files changed, 629 insertions(+), 480 deletions(-) diff --git a/src/math/acos.c b/src/math/acos.c index e8e7743..f9d28f0 100644 --- a/src/math/acos.c +++ b/src/math/acos.c @@ -22,14 +22,15 @@ int main(void) y = acos(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s acos(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s acos(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s acos(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s acos(%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/acosf.c b/src/math/acosf.c index db12e88..fb20f89 100644 --- a/src/math/acosf.c +++ b/src/math/acosf.c @@ -21,14 +21,15 @@ int main(void) y = acosf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s acosf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s acosf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s acosf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s acosf(%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/acosh.c b/src/math/acosh.c index ca5dd8d..60680c2 100644 --- a/src/math/acosh.c +++ b/src/math/acosh.c @@ -20,14 +20,15 @@ int main(void) y = acosh(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s acosh(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s acosh(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s acosh(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s acosh(%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/acoshf.c b/src/math/acoshf.c index 0036809..60ceb58 100644 --- a/src/math/acoshf.c +++ b/src/math/acoshf.c @@ -20,14 +20,15 @@ int main(void) y = acoshf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s acoshf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s acoshf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s acoshf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s acoshf(%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/acoshl.c b/src/math/acoshl.c index 3fd17c1..63a7334 100644 --- a/src/math/acoshl.c +++ b/src/math/acoshl.c @@ -25,14 +25,15 @@ int main(void) y = acoshl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s acoshl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s acoshl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s acoshl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s acoshl(%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/acosl.c b/src/math/acosl.c index 3d3c3fd..ecd6f62 100644 --- a/src/math/acosl.c +++ b/src/math/acosl.c @@ -27,14 +27,15 @@ int main(void) y = acosl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s acosl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s acosl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s acosl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s acosl(%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/asin.c b/src/math/asin.c index 3e338d4..193264c 100644 --- a/src/math/asin.c +++ b/src/math/asin.c @@ -22,14 +22,15 @@ int main(void) y = asin(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s asin(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s asin(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s asin(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s asin(%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/asinf.c b/src/math/asinf.c index a8dc6da..0fe46b8 100644 --- a/src/math/asinf.c +++ b/src/math/asinf.c @@ -21,14 +21,15 @@ int main(void) y = asinf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s asinf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s asinf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s asinf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s asinf(%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/asinh.c b/src/math/asinh.c index 2a4ebff..132e942 100644 --- a/src/math/asinh.c +++ b/src/math/asinh.c @@ -20,14 +20,15 @@ int main(void) y = asinh(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s asinh(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s asinh(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s asinh(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s asinh(%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/asinhf.c b/src/math/asinhf.c index 84c31ac..e2681dd 100644 --- a/src/math/asinhf.c +++ b/src/math/asinhf.c @@ -20,14 +20,15 @@ int main(void) y = asinhf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s asinhf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s asinhf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s asinhf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s asinhf(%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/asinhl.c b/src/math/asinhl.c index 5548268..b65aff4 100644 --- a/src/math/asinhl.c +++ b/src/math/asinhl.c @@ -25,14 +25,15 @@ int main(void) y = asinhl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s asinhl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s asinhl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s asinhl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s asinhl(%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/asinl.c b/src/math/asinl.c index 76b20ec..9fc0982 100644 --- a/src/math/asinl.c +++ b/src/math/asinl.c @@ -27,14 +27,15 @@ int main(void) y = asinl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s asinl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s asinl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s asinl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s asinl(%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/atan.c b/src/math/atan.c index 2a18f5f..527aeb2 100644 --- a/src/math/atan.c +++ b/src/math/atan.c @@ -22,14 +22,15 @@ int main(void) y = atan(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s atan(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s atan(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s atan(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s atan(%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/atan2.c b/src/math/atan2.c index ea09cc2..a0b55ab 100644 --- a/src/math/atan2.c +++ b/src/math/atan2.c @@ -21,14 +21,15 @@ int main(void) y = atan2(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s atan2(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s atan2(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s atan2(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s atan2(%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/atan2f.c b/src/math/atan2f.c index 5a83528..872ef59 100644 --- a/src/math/atan2f.c +++ b/src/math/atan2f.c @@ -21,14 +21,15 @@ int main(void) y = atan2f(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s atan2f(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s atan2f(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s atan2f(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s atan2f(%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/atan2l.c b/src/math/atan2l.c index ad6ee9f..c809e67 100644 --- a/src/math/atan2l.c +++ b/src/math/atan2l.c @@ -26,14 +26,15 @@ int main(void) y = atan2l(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s atan2l(%La,%La)==%La except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s atan2l(%La,%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s atan2l(%La,%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s atan2l(%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/atanf.c b/src/math/atanf.c index 7609bb7..c3f016b 100644 --- a/src/math/atanf.c +++ b/src/math/atanf.c @@ -21,14 +21,15 @@ int main(void) y = atanf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s atanf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s atanf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s atanf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s atanf(%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/atanh.c b/src/math/atanh.c index 4ddc552..55dfa1c 100644 --- a/src/math/atanh.c +++ b/src/math/atanh.c @@ -20,14 +20,15 @@ int main(void) y = atanh(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s atanh(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s atanh(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s atanh(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s atanh(%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/atanhf.c b/src/math/atanhf.c index 66e1ce0..a772971 100644 --- a/src/math/atanhf.c +++ b/src/math/atanhf.c @@ -20,14 +20,15 @@ int main(void) y = atanhf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s atanhf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s atanhf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s atanhf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s atanhf(%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/atanhl.c b/src/math/atanhl.c index ac744c4..230c1da 100644 --- a/src/math/atanhl.c +++ b/src/math/atanhl.c @@ -25,14 +25,15 @@ int main(void) y = atanhl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s atanhl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s atanhl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s atanhl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s atanhl(%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/atanl.c b/src/math/atanl.c index 5bf3ee7..0aee4a4 100644 --- a/src/math/atanl.c +++ b/src/math/atanl.c @@ -27,14 +27,15 @@ int main(void) y = atanl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s atanl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s atanl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s atanl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s atanl(%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/cbrt.c b/src/math/cbrt.c index 242ac4e..4faf739 100644 --- a/src/math/cbrt.c +++ b/src/math/cbrt.c @@ -20,14 +20,15 @@ int main(void) y = cbrt(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s cbrt(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s cbrt(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s cbrt(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s cbrt(%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/cbrtf.c b/src/math/cbrtf.c index 51abd53..9737fbb 100644 --- a/src/math/cbrtf.c +++ b/src/math/cbrtf.c @@ -20,14 +20,15 @@ int main(void) y = cbrtf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s cbrtf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s cbrtf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s cbrtf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s cbrtf(%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/cbrtl.c b/src/math/cbrtl.c index 2b6b095..037a397 100644 --- a/src/math/cbrtl.c +++ b/src/math/cbrtl.c @@ -25,14 +25,15 @@ int main(void) y = cbrtl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s cbrtl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s cbrtl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s cbrtl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s cbrtl(%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/ceil.c b/src/math/ceil.c index e9c4061..ab6be5f 100644 --- a/src/math/ceil.c +++ b/src/math/ceil.c @@ -21,14 +21,15 @@ int main(void) y = ceil(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s ceil(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s ceil(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s ceil(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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 afbf1ce..dbc18d5 100644 --- a/src/math/ceilf.c +++ b/src/math/ceilf.c @@ -21,14 +21,15 @@ int main(void) y = ceilf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s ceilf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s ceilf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s ceilf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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 5e8857e..4971447 100644 --- a/src/math/ceill.c +++ b/src/math/ceill.c @@ -26,14 +26,15 @@ int main(void) y = ceill(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s ceill(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s ceill(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s ceill(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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 51ce3ac..2f1464c 100644 --- a/src/math/copysign.c +++ b/src/math/copysign.c @@ -20,14 +20,15 @@ int main(void) y = copysign(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s copysign(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s copysign(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s copysign(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + 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 98e1de5..8456a8f 100644 --- a/src/math/copysignf.c +++ b/src/math/copysignf.c @@ -20,14 +20,15 @@ int main(void) y = copysignf(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s copysignf(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s copysignf(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s copysignf(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + 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 a9a702f..7849aa9 100644 --- a/src/math/copysignl.c +++ b/src/math/copysignl.c @@ -25,14 +25,15 @@ int main(void) y = copysignl(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s copysignl(%La,%La)==%La except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s copysignl(%La,%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s copysignl(%La,%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + 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/cos.c b/src/math/cos.c index dcb026d..74bc57b 100644 --- a/src/math/cos.c +++ b/src/math/cos.c @@ -22,14 +22,15 @@ int main(void) y = cos(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s cos(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s cos(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s cos(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s cos(%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/cosf.c b/src/math/cosf.c index 2103981..cf9aa29 100644 --- a/src/math/cosf.c +++ b/src/math/cosf.c @@ -21,14 +21,15 @@ int main(void) y = cosf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s cosf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s cosf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s cosf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s cosf(%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/cosh.c b/src/math/cosh.c index 3fa9466..29f3ef5 100644 --- a/src/math/cosh.c +++ b/src/math/cosh.c @@ -22,14 +22,15 @@ int main(void) y = cosh(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s cosh(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s cosh(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s cosh(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s cosh(%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/coshf.c b/src/math/coshf.c index 10a1dd9..955736c 100644 --- a/src/math/coshf.c +++ b/src/math/coshf.c @@ -21,14 +21,15 @@ int main(void) y = coshf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s coshf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s coshf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s coshf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s coshf(%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/coshl.c b/src/math/coshl.c index ae2dcc3..880737a 100644 --- a/src/math/coshl.c +++ b/src/math/coshl.c @@ -27,14 +27,15 @@ int main(void) y = coshl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s coshl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s coshl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s coshl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s coshl(%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/cosl.c b/src/math/cosl.c index d59b519..8788a95 100644 --- a/src/math/cosl.c +++ b/src/math/cosl.c @@ -27,14 +27,15 @@ int main(void) y = cosl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s cosl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s cosl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s cosl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s cosl(%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/erf.c b/src/math/erf.c index f6e837a..6d085dc 100644 --- a/src/math/erf.c +++ b/src/math/erf.c @@ -20,14 +20,15 @@ int main(void) y = erf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s erf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s erf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s erf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s erf(%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/erfc.c b/src/math/erfc.c index f67d30f..fb9fe9b 100644 --- a/src/math/erfc.c +++ b/src/math/erfc.c @@ -20,14 +20,15 @@ int main(void) y = erfc(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s erfc(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s erfc(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s erfc(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s erfc(%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/erfcf.c b/src/math/erfcf.c index 9c3e2a4..39629b0 100644 --- a/src/math/erfcf.c +++ b/src/math/erfcf.c @@ -20,14 +20,15 @@ int main(void) y = erfcf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s erfcf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s erfcf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s erfcf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s erfcf(%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/erfcl.c b/src/math/erfcl.c index 6a7b34c..8720138 100644 --- a/src/math/erfcl.c +++ b/src/math/erfcl.c @@ -25,14 +25,15 @@ int main(void) y = erfcl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s erfcl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s erfcl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s erfcl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s erfcl(%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/erff.c b/src/math/erff.c index 17430b7..5b95fd3 100644 --- a/src/math/erff.c +++ b/src/math/erff.c @@ -20,14 +20,15 @@ int main(void) y = erff(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s erff(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s erff(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s erff(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s erff(%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/erfl.c b/src/math/erfl.c index dba10e1..b03cc74 100644 --- a/src/math/erfl.c +++ b/src/math/erfl.c @@ -25,14 +25,15 @@ int main(void) y = erfl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s erfl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s erfl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s erfl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s erfl(%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/exp.c b/src/math/exp.c index 4d5202d..6f27409 100644 --- a/src/math/exp.c +++ b/src/math/exp.c @@ -22,14 +22,15 @@ int main(void) y = exp(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s exp(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s exp(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s exp(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s exp(%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/exp10.c b/src/math/exp10.c index 57367c3..dff72a7 100644 --- a/src/math/exp10.c +++ b/src/math/exp10.c @@ -20,14 +20,15 @@ int main(void) y = exp10(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s exp10(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s exp10(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s exp10(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s exp10(%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/exp10f.c b/src/math/exp10f.c index a38b821..b0b1645 100644 --- a/src/math/exp10f.c +++ b/src/math/exp10f.c @@ -20,14 +20,15 @@ int main(void) y = exp10f(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s exp10f(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s exp10f(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s exp10f(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s exp10f(%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/exp10l.c b/src/math/exp10l.c index e02da03..273e816 100644 --- a/src/math/exp10l.c +++ b/src/math/exp10l.c @@ -25,14 +25,15 @@ int main(void) y = exp10l(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s exp10l(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s exp10l(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s exp10l(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s exp10l(%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/exp2.c b/src/math/exp2.c index 7892156..2d2567e 100644 --- a/src/math/exp2.c +++ b/src/math/exp2.c @@ -20,14 +20,15 @@ int main(void) y = exp2(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s exp2(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s exp2(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s exp2(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s exp2(%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/exp2f.c b/src/math/exp2f.c index 405cef3..02eb8fb 100644 --- a/src/math/exp2f.c +++ b/src/math/exp2f.c @@ -20,14 +20,15 @@ int main(void) y = exp2f(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s exp2f(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s exp2f(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s exp2f(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s exp2f(%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/exp2l.c b/src/math/exp2l.c index 9870378..f283edf 100644 --- a/src/math/exp2l.c +++ b/src/math/exp2l.c @@ -25,14 +25,15 @@ int main(void) y = exp2l(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s exp2l(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s exp2l(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s exp2l(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s exp2l(%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/expf.c b/src/math/expf.c index 1476faa..f80c64b 100644 --- a/src/math/expf.c +++ b/src/math/expf.c @@ -21,14 +21,15 @@ int main(void) y = expf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s expf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s expf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s expf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s expf(%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/expl.c b/src/math/expl.c index 68ad645..e65d6e4 100644 --- a/src/math/expl.c +++ b/src/math/expl.c @@ -27,14 +27,15 @@ int main(void) y = expl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s expl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s expl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s expl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s expl(%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/expm1.c b/src/math/expm1.c index b8537fd..9780a97 100644 --- a/src/math/expm1.c +++ b/src/math/expm1.c @@ -21,14 +21,15 @@ int main(void) y = expm1(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s expm1(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s expm1(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s expm1(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s expm1(%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/expm1f.c b/src/math/expm1f.c index ff5afe0..3c1dc94 100644 --- a/src/math/expm1f.c +++ b/src/math/expm1f.c @@ -20,14 +20,15 @@ int main(void) y = expm1f(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s expm1f(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s expm1f(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s expm1f(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s expm1f(%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/expm1l.c b/src/math/expm1l.c index 8ce0bec..1668f63 100644 --- a/src/math/expm1l.c +++ b/src/math/expm1l.c @@ -26,14 +26,15 @@ int main(void) y = expm1l(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s expm1l(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s expm1l(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s expm1l(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s expm1l(%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/fabs.c b/src/math/fabs.c index cc4cf9a..1cd8716 100644 --- a/src/math/fabs.c +++ b/src/math/fabs.c @@ -21,14 +21,15 @@ int main(void) y = fabs(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s fabs(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s fabs(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s fabs(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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 4b54a42..4c418b8 100644 --- a/src/math/fabsf.c +++ b/src/math/fabsf.c @@ -21,14 +21,15 @@ int main(void) y = fabsf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s fabsf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s fabsf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s fabsf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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 0670fe8..5963f51 100644 --- a/src/math/fabsl.c +++ b/src/math/fabsl.c @@ -26,14 +26,15 @@ int main(void) y = fabsl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s fabsl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s fabsl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s fabsl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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/fdim.c b/src/math/fdim.c index 7ef0ab6..0857a49 100644 --- a/src/math/fdim.c +++ b/src/math/fdim.c @@ -20,14 +20,15 @@ int main(void) y = fdim(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s fdim(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s fdim(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s fdim(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s fdim(%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/fdimf.c b/src/math/fdimf.c index 8e1d6d1..1c940b9 100644 --- a/src/math/fdimf.c +++ b/src/math/fdimf.c @@ -20,14 +20,15 @@ int main(void) y = fdimf(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s fdimf(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s fdimf(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s fdimf(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s fdimf(%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/fdiml.c b/src/math/fdiml.c index a8c37e1..1f41eda 100644 --- a/src/math/fdiml.c +++ b/src/math/fdiml.c @@ -25,14 +25,15 @@ int main(void) y = fdiml(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s fdiml(%La,%La)==%La except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s fdiml(%La,%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s fdiml(%La,%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s fdiml(%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/floor.c b/src/math/floor.c index 6e16c0b..1e4928f 100644 --- a/src/math/floor.c +++ b/src/math/floor.c @@ -21,14 +21,15 @@ int main(void) y = floor(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s floor(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s floor(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s floor(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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 7013fd8..4b71391 100644 --- a/src/math/floorf.c +++ b/src/math/floorf.c @@ -21,14 +21,15 @@ int main(void) y = floorf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s floorf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s floorf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s floorf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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 bb1b756..a6856e3 100644 --- a/src/math/floorl.c +++ b/src/math/floorl.c @@ -26,14 +26,15 @@ int main(void) y = floorl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s floorl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s floorl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s floorl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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/fmax.c b/src/math/fmax.c index 80d4770..938361c 100644 --- a/src/math/fmax.c +++ b/src/math/fmax.c @@ -20,14 +20,15 @@ int main(void) y = fmax(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s fmax(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s fmax(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s fmax(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + 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 d0b7d53..febb8a7 100644 --- a/src/math/fmaxf.c +++ b/src/math/fmaxf.c @@ -20,14 +20,15 @@ int main(void) y = fmaxf(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s fmaxf(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s fmaxf(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s fmaxf(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + 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 9dc815e..e074e13 100644 --- a/src/math/fmaxl.c +++ b/src/math/fmaxl.c @@ -25,14 +25,15 @@ int main(void) y = fmaxl(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s fmaxl(%La,%La)==%La except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s fmaxl(%La,%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s fmaxl(%La,%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + 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 81e1c5c..eae3d64 100644 --- a/src/math/fmin.c +++ b/src/math/fmin.c @@ -20,14 +20,15 @@ int main(void) y = fmin(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s fmin(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s fmin(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s fmin(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + 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 0655668..5727b73 100644 --- a/src/math/fminf.c +++ b/src/math/fminf.c @@ -20,14 +20,15 @@ int main(void) y = fminf(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s fminf(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s fminf(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s fminf(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + 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 2f71065..fb6b17f 100644 --- a/src/math/fminl.c +++ b/src/math/fminl.c @@ -25,14 +25,15 @@ int main(void) y = fminl(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s fminl(%La,%La)==%La except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s fminl(%La,%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s fminl(%La,%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + 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/fmod.c b/src/math/fmod.c index 5df9d95..8c7765f 100644 --- a/src/math/fmod.c +++ b/src/math/fmod.c @@ -21,14 +21,15 @@ int main(void) y = fmod(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s fmod(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s fmod(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s fmod(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s fmod(%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/fmodf.c b/src/math/fmodf.c index 2b83ab1..3396b4e 100644 --- a/src/math/fmodf.c +++ b/src/math/fmodf.c @@ -21,14 +21,15 @@ int main(void) y = fmodf(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s fmodf(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s fmodf(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s fmodf(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s fmodf(%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/fmodl.c b/src/math/fmodl.c index fa699ab..15486cb 100644 --- a/src/math/fmodl.c +++ b/src/math/fmodl.c @@ -26,14 +26,15 @@ int main(void) y = fmodl(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s fmodl(%La,%La)==%La except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s fmodl(%La,%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s fmodl(%La,%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s fmodl(%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/gen/mp.c b/src/math/gen/mp.c index 50182e3..56badb5 100644 --- a/src/math/gen/mp.c +++ b/src/math/gen/mp.c @@ -494,9 +494,9 @@ int mplogbl(struct t *t) t->e = 0; return 0; } -int mpnearbyint(struct t *t) { return mpd1(t, wrap_nearbyint); } -int mpnearbyintf(struct t *t) { return mpf1(t, wrap_nearbyint); } -int mpnearbyintl(struct t *t) { return mpl1(t, wrap_nearbyint); } +int mpnearbyint(struct t *t) { return mpd1(t, wrap_nearbyint) || (t->e&=~INEXACT, 0); } +int mpnearbyintf(struct t *t) { return mpf1(t, wrap_nearbyint) || (t->e&=~INEXACT, 0); } +int mpnearbyintl(struct t *t) { return mpl1(t, wrap_nearbyint) || (t->e&=~INEXACT, 0); } int mpnextafter(struct t *t) { return -1; } int mpnextafterf(struct t *t) { return -1; } int mpnextafterl(struct t *t) { return -1; } diff --git a/src/math/gen/template/d_d.c b/src/math/gen/template/d_d.c index dac36b6..9a7ba82 100644 --- a/src/math/gen/template/d_d.c +++ b/src/math/gen/template/d_d.c @@ -19,14 +19,15 @@ int main(void) y = ___(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s ___(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s ___(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s ___(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s ___(%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/gen/template/dd_d.c b/src/math/gen/template/dd_d.c index dded2f9..2f46d1d 100644 --- a/src/math/gen/template/dd_d.c +++ b/src/math/gen/template/dd_d.c @@ -19,14 +19,15 @@ int main(void) y = ___(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s ___(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s ___(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s ___(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s ___(%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/gen/template/f_f.c b/src/math/gen/template/f_f.c index eac90b1..4538c6b 100644 --- a/src/math/gen/template/f_f.c +++ b/src/math/gen/template/f_f.c @@ -19,14 +19,15 @@ int main(void) y = ___(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s ___(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s ___(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s ___(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s ___(%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/gen/template/ff_f.c b/src/math/gen/template/ff_f.c index 287d1b1..6b3ae58 100644 --- a/src/math/gen/template/ff_f.c +++ b/src/math/gen/template/ff_f.c @@ -19,14 +19,15 @@ int main(void) y = ___(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s ___(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s ___(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s ___(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s ___(%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/gen/template/l_l.c b/src/math/gen/template/l_l.c index 1919579..82c9003 100644 --- a/src/math/gen/template/l_l.c +++ b/src/math/gen/template/l_l.c @@ -23,14 +23,15 @@ int main(void) y = ___(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s ___(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s ___(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s ___(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s ___(%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/gen/template/ll_l.c b/src/math/gen/template/ll_l.c index 1d7a5a0..09178bd 100644 --- a/src/math/gen/template/ll_l.c +++ b/src/math/gen/template/ll_l.c @@ -23,14 +23,15 @@ int main(void) y = ___(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s ___(%La,%La)==%La except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s ___(%La,%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s ___(%La,%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s ___(%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/hypot.c b/src/math/hypot.c index 5a3add5..eef74b1 100644 --- a/src/math/hypot.c +++ b/src/math/hypot.c @@ -21,14 +21,15 @@ int main(void) y = hypot(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s hypot(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s hypot(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s hypot(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s hypot(%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/hypotf.c b/src/math/hypotf.c index 01ce636..91f5a2d 100644 --- a/src/math/hypotf.c +++ b/src/math/hypotf.c @@ -21,14 +21,15 @@ int main(void) y = hypotf(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s hypotf(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s hypotf(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s hypotf(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s hypotf(%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/hypotl.c b/src/math/hypotl.c index 6a69746..d84c6c8 100644 --- a/src/math/hypotl.c +++ b/src/math/hypotl.c @@ -26,14 +26,15 @@ int main(void) y = hypotl(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s hypotl(%La,%La)==%La except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s hypotl(%La,%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s hypotl(%La,%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s hypotl(%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/j0.c b/src/math/j0.c index ddf4064..c40d4f0 100644 --- a/src/math/j0.c +++ b/src/math/j0.c @@ -20,14 +20,15 @@ int main(void) y = j0(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s j0(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s j0(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s j0(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s j0(%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/j0f.c b/src/math/j0f.c index 63dea2d..94a213c 100644 --- a/src/math/j0f.c +++ b/src/math/j0f.c @@ -20,14 +20,15 @@ int main(void) y = j0f(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s j0f(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s j0f(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s j0f(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s j0f(%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/j1.c b/src/math/j1.c index 895f7d5..4d620f9 100644 --- a/src/math/j1.c +++ b/src/math/j1.c @@ -20,14 +20,15 @@ int main(void) y = j1(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s j1(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s j1(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s j1(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s j1(%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/j1f.c b/src/math/j1f.c index 7083216..c6efdb7 100644 --- a/src/math/j1f.c +++ b/src/math/j1f.c @@ -20,14 +20,15 @@ int main(void) y = j1f(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s j1f(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s j1f(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s j1f(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s j1f(%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/log.c b/src/math/log.c index 17a2a55..c0150f2 100644 --- a/src/math/log.c +++ b/src/math/log.c @@ -22,14 +22,15 @@ int main(void) y = log(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s log(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s log(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s log(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s log(%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/log10.c b/src/math/log10.c index 4bd80cc..d93d600 100644 --- a/src/math/log10.c +++ b/src/math/log10.c @@ -22,14 +22,15 @@ int main(void) y = log10(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s log10(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s log10(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s log10(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s log10(%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/log10f.c b/src/math/log10f.c index d3ecdfa..d9cf952 100644 --- a/src/math/log10f.c +++ b/src/math/log10f.c @@ -21,14 +21,15 @@ int main(void) y = log10f(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s log10f(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s log10f(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s log10f(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s log10f(%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/log10l.c b/src/math/log10l.c index e0f9eee..d5fea94 100644 --- a/src/math/log10l.c +++ b/src/math/log10l.c @@ -27,14 +27,15 @@ int main(void) y = log10l(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s log10l(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s log10l(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s log10l(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s log10l(%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/log1p.c b/src/math/log1p.c index 8bd027a..8824d1c 100644 --- a/src/math/log1p.c +++ b/src/math/log1p.c @@ -21,14 +21,15 @@ int main(void) y = log1p(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s log1p(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s log1p(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s log1p(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s log1p(%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/log1pf.c b/src/math/log1pf.c index 3e7bbfb..e1ae18a 100644 --- a/src/math/log1pf.c +++ b/src/math/log1pf.c @@ -20,14 +20,15 @@ int main(void) y = log1pf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s log1pf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s log1pf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s log1pf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s log1pf(%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/log1pl.c b/src/math/log1pl.c index 625628c..08964bd 100644 --- a/src/math/log1pl.c +++ b/src/math/log1pl.c @@ -26,14 +26,15 @@ int main(void) y = log1pl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s log1pl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s log1pl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s log1pl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s log1pl(%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/log2.c b/src/math/log2.c index e1751ba..283c813 100644 --- a/src/math/log2.c +++ b/src/math/log2.c @@ -21,14 +21,15 @@ int main(void) y = log2(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s log2(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s log2(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s log2(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s log2(%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/log2f.c b/src/math/log2f.c index 3c97dbb..333fc85 100644 --- a/src/math/log2f.c +++ b/src/math/log2f.c @@ -20,14 +20,15 @@ int main(void) y = log2f(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s log2f(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s log2f(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s log2f(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s log2f(%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/log2l.c b/src/math/log2l.c index 234a4fb..28e2b3f 100644 --- a/src/math/log2l.c +++ b/src/math/log2l.c @@ -26,14 +26,15 @@ int main(void) y = log2l(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s log2l(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s log2l(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s log2l(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s log2l(%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/logb.c b/src/math/logb.c index 3c9666a..52fcbb0 100644 --- a/src/math/logb.c +++ b/src/math/logb.c @@ -20,14 +20,15 @@ int main(void) y = logb(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s logb(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s logb(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s logb(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s logb(%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/logbf.c b/src/math/logbf.c index 38d6608..7595cf1 100644 --- a/src/math/logbf.c +++ b/src/math/logbf.c @@ -20,14 +20,15 @@ int main(void) y = logbf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s logbf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s logbf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s logbf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s logbf(%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/logbl.c b/src/math/logbl.c index 149d19f..6cb7005 100644 --- a/src/math/logbl.c +++ b/src/math/logbl.c @@ -25,14 +25,15 @@ int main(void) y = logbl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s logbl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s logbl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s logbl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s logbl(%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/logf.c b/src/math/logf.c index 03bda8f..aa5863c 100644 --- a/src/math/logf.c +++ b/src/math/logf.c @@ -21,14 +21,15 @@ int main(void) y = logf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s logf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s logf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s logf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s logf(%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/logl.c b/src/math/logl.c index 0141042..c1a534f 100644 --- a/src/math/logl.c +++ b/src/math/logl.c @@ -27,14 +27,15 @@ int main(void) y = logl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s logl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s logl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s logl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s logl(%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/nearbyint.c b/src/math/nearbyint.c index d3c4850..988555f 100644 --- a/src/math/nearbyint.c +++ b/src/math/nearbyint.c @@ -20,14 +20,15 @@ int main(void) y = nearbyint(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s nearbyint(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s nearbyint(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s nearbyint(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s nearbyint(%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/nearbyintf.c b/src/math/nearbyintf.c index 7ebfd36..7f65ba2 100644 --- a/src/math/nearbyintf.c +++ b/src/math/nearbyintf.c @@ -20,14 +20,15 @@ int main(void) y = nearbyintf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s nearbyintf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s nearbyintf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s nearbyintf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s nearbyintf(%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/nearbyintl.c b/src/math/nearbyintl.c index 82bb73c..d819f25 100644 --- a/src/math/nearbyintl.c +++ b/src/math/nearbyintl.c @@ -25,14 +25,15 @@ int main(void) y = nearbyintl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s nearbyintl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s nearbyintl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s nearbyintl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s nearbyintl(%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/nextafter.c b/src/math/nextafter.c index 64524ee..edf62e9 100644 --- a/src/math/nextafter.c +++ b/src/math/nextafter.c @@ -19,14 +19,15 @@ int main(void) y = nextafter(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s nextafter(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s nextafter(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s nextafter(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + 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 71bf91b..2550bbd 100644 --- a/src/math/nextafterf.c +++ b/src/math/nextafterf.c @@ -19,14 +19,15 @@ int main(void) y = nextafterf(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s nextafterf(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s nextafterf(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s nextafterf(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + 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 283e2ab..cbdf287 100644 --- a/src/math/nextafterl.c +++ b/src/math/nextafterl.c @@ -23,14 +23,15 @@ int main(void) y = nextafterl(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s nextafterl(%La,%La)==%La except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s nextafterl(%La,%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s nextafterl(%La,%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + 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/nexttowardl.c b/src/math/nexttowardl.c index ba372d5..19525dd 100644 --- a/src/math/nexttowardl.c +++ b/src/math/nexttowardl.c @@ -23,14 +23,15 @@ int main(void) y = nexttowardl(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s nexttowardl(%La,%La)==%La except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s nexttowardl(%La,%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s nexttowardl(%La,%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + 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/pow.c b/src/math/pow.c index a3bf732..ef7129b 100644 --- a/src/math/pow.c +++ b/src/math/pow.c @@ -22,14 +22,15 @@ int main(void) y = pow(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s pow(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s pow(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s pow(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s pow(%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/pow10.c b/src/math/pow10.c index 3034e21..a487aa5 100644 --- a/src/math/pow10.c +++ b/src/math/pow10.c @@ -20,14 +20,15 @@ int main(void) y = pow10(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s pow10(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s pow10(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s pow10(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s pow10(%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/pow10f.c b/src/math/pow10f.c index 145948d..74f53f4 100644 --- a/src/math/pow10f.c +++ b/src/math/pow10f.c @@ -20,14 +20,15 @@ int main(void) y = pow10f(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s pow10f(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s pow10f(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s pow10f(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s pow10f(%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/pow10l.c b/src/math/pow10l.c index af3bc12..c1d2a23 100644 --- a/src/math/pow10l.c +++ b/src/math/pow10l.c @@ -25,14 +25,15 @@ int main(void) y = pow10l(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s pow10l(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s pow10l(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s pow10l(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s pow10l(%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/powf.c b/src/math/powf.c index 23200d3..054671a 100644 --- a/src/math/powf.c +++ b/src/math/powf.c @@ -21,14 +21,15 @@ int main(void) y = powf(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s powf(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s powf(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s powf(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s powf(%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/powl.c b/src/math/powl.c index c5d5fee..7c94362 100644 --- a/src/math/powl.c +++ b/src/math/powl.c @@ -27,14 +27,15 @@ int main(void) y = powl(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s powl(%La,%La)==%La except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s powl(%La,%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s powl(%La,%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s powl(%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/remainder.c b/src/math/remainder.c index 3870fcf..45321a5 100644 --- a/src/math/remainder.c +++ b/src/math/remainder.c @@ -20,14 +20,15 @@ int main(void) y = remainder(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s remainder(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s remainder(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s remainder(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s remainder(%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/remainderf.c b/src/math/remainderf.c index 5279c58..bbaebcb 100644 --- a/src/math/remainderf.c +++ b/src/math/remainderf.c @@ -20,14 +20,15 @@ int main(void) y = remainderf(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s remainderf(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s remainderf(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s remainderf(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s remainderf(%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/remainderl.c b/src/math/remainderl.c index 727a261..08305e7 100644 --- a/src/math/remainderl.c +++ b/src/math/remainderl.c @@ -25,14 +25,15 @@ int main(void) y = remainderl(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s remainderl(%La,%La)==%La except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s remainderl(%La,%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s remainderl(%La,%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s remainderl(%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 8ed9af7..e4e1009 100644 --- a/src/math/rint.c +++ b/src/math/rint.c @@ -20,14 +20,15 @@ int main(void) y = rint(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s rint(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s rint(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s rint(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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 78a0ffc..707fdb1 100644 --- a/src/math/rintf.c +++ b/src/math/rintf.c @@ -20,14 +20,15 @@ int main(void) y = rintf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s rintf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s rintf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s rintf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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 f232f74..331796c 100644 --- a/src/math/rintl.c +++ b/src/math/rintl.c @@ -25,14 +25,15 @@ int main(void) y = rintl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s rintl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s rintl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s rintl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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 0535fd2..fa6e3b7 100644 --- a/src/math/round.c +++ b/src/math/round.c @@ -20,14 +20,15 @@ int main(void) y = round(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s round(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s round(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s round(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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 c9a18ce..78a5dae 100644 --- a/src/math/roundf.c +++ b/src/math/roundf.c @@ -20,14 +20,15 @@ int main(void) y = roundf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s roundf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s roundf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s roundf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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 ad64c9a..53c0b53 100644 --- a/src/math/roundl.c +++ b/src/math/roundl.c @@ -25,14 +25,15 @@ int main(void) y = roundl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s roundl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s roundl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s roundl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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/sanity/nearbyint.h b/src/math/sanity/nearbyint.h index b809415..bf71b2e 100644 --- a/src/math/sanity/nearbyint.h +++ b/src/math/sanity/nearbyint.h @@ -1,10 +1,10 @@ -T(RN, -0x1.02239f3c6a8f1p+3, -0x1p+3, 0x0p+0, INEXACT) -T(RN, 0x1.161868e18bc67p+2, 0x1p+2, 0x0p+0, INEXACT) -T(RN, -0x1.0c34b3e01e6e7p+3, -0x1p+3, 0x0p+0, INEXACT) -T(RN, -0x1.a206f0a19dcc4p+2, -0x1.cp+2, 0x0p+0, INEXACT) -T(RN, 0x1.288bbb0d6a1e6p+3, 0x1.2p+3, 0x0p+0, INEXACT) -T(RN, 0x1.52efd0cd80497p-1, 0x1p+0, 0x0p+0, INEXACT) -T(RN, -0x1.a05cc754481d1p-2, -0x0p+0, 0x0p+0, INEXACT) -T(RN, 0x1.1f9ef934745cbp-1, 0x1p+0, 0x0p+0, INEXACT) -T(RN, 0x1.8c5db097f7442p-1, 0x1p+0, 0x0p+0, INEXACT) -T(RN, -0x1.5b86ea8118a0ep-1, -0x1p+0, 0x0p+0, INEXACT) +T(RN, -0x1.02239f3c6a8f1p+3, -0x1p+3, 0x0p+0, 0) +T(RN, 0x1.161868e18bc67p+2, 0x1p+2, 0x0p+0, 0) +T(RN, -0x1.0c34b3e01e6e7p+3, -0x1p+3, 0x0p+0, 0) +T(RN, -0x1.a206f0a19dcc4p+2, -0x1.cp+2, 0x0p+0, 0) +T(RN, 0x1.288bbb0d6a1e6p+3, 0x1.2p+3, 0x0p+0, 0) +T(RN, 0x1.52efd0cd80497p-1, 0x1p+0, 0x0p+0, 0) +T(RN, -0x1.a05cc754481d1p-2, -0x0p+0, 0x0p+0, 0) +T(RN, 0x1.1f9ef934745cbp-1, 0x1p+0, 0x0p+0, 0) +T(RN, 0x1.8c5db097f7442p-1, 0x1p+0, 0x0p+0, 0) +T(RN, -0x1.5b86ea8118a0ep-1, -0x1p+0, 0x0p+0, 0) diff --git a/src/math/sanity/nearbyintf.h b/src/math/sanity/nearbyintf.h index 32b2d69..132aec9 100644 --- a/src/math/sanity/nearbyintf.h +++ b/src/math/sanity/nearbyintf.h @@ -1,10 +1,10 @@ -T(RN, -0x1.0223ap+3, -0x1p+3, 0x0p+0, INEXACT) -T(RN, 0x1.161868p+2, 0x1p+2, 0x0p+0, INEXACT) -T(RN, -0x1.0c34b4p+3, -0x1p+3, 0x0p+0, INEXACT) -T(RN, -0x1.a206fp+2, -0x1.cp+2, 0x0p+0, INEXACT) -T(RN, 0x1.288bbcp+3, 0x1.2p+3, 0x0p+0, INEXACT) -T(RN, 0x1.52efdp-1, 0x1p+0, 0x0p+0, INEXACT) -T(RN, -0x1.a05cc8p-2, -0x0p+0, 0x0p+0, INEXACT) -T(RN, 0x1.1f9efap-1, 0x1p+0, 0x0p+0, INEXACT) -T(RN, 0x1.8c5dbp-1, 0x1p+0, 0x0p+0, INEXACT) -T(RN, -0x1.5b86eap-1, -0x1p+0, 0x0p+0, INEXACT) +T(RN, -0x1.0223ap+3, -0x1p+3, 0x0p+0, 0) +T(RN, 0x1.161868p+2, 0x1p+2, 0x0p+0, 0) +T(RN, -0x1.0c34b4p+3, -0x1p+3, 0x0p+0, 0) +T(RN, -0x1.a206fp+2, -0x1.cp+2, 0x0p+0, 0) +T(RN, 0x1.288bbcp+3, 0x1.2p+3, 0x0p+0, 0) +T(RN, 0x1.52efdp-1, 0x1p+0, 0x0p+0, 0) +T(RN, -0x1.a05cc8p-2, -0x0p+0, 0x0p+0, 0) +T(RN, 0x1.1f9efap-1, 0x1p+0, 0x0p+0, 0) +T(RN, 0x1.8c5dbp-1, 0x1p+0, 0x0p+0, 0) +T(RN, -0x1.5b86eap-1, -0x1p+0, 0x0p+0, 0) diff --git a/src/math/sanity/nearbyintl.h b/src/math/sanity/nearbyintl.h index fcf5aaa..46d0617 100644 --- a/src/math/sanity/nearbyintl.h +++ b/src/math/sanity/nearbyintl.h @@ -1,10 +1,10 @@ -T(RN, -0x1.02239f3c6a8f13dep+3L, -0x1p+3L, 0x0p+0, INEXACT) -T(RN, 0x1.161868e18bc67782p+2L, 0x1p+2L, 0x0p+0, INEXACT) -T(RN, -0x1.0c34b3e01e6e682cp+3L, -0x1p+3L, 0x0p+0, INEXACT) -T(RN, -0x1.a206f0a19dcc3948p+2L, -0x1.cp+2L, 0x0p+0, INEXACT) -T(RN, 0x1.288bbb0d6a1e5bdap+3L, 0x1.2p+3L, 0x0p+0, INEXACT) -T(RN, 0x1.52efd0cd80496a5ap-1L, 0x1p+0L, 0x0p+0, INEXACT) -T(RN, -0x1.a05cc754481d0bdp-2L, -0x0p+0L, 0x0p+0, INEXACT) -T(RN, 0x1.1f9ef934745cad6p-1L, 0x1p+0L, 0x0p+0, INEXACT) -T(RN, 0x1.8c5db097f744257ep-1L, 0x1p+0L, 0x0p+0, INEXACT) -T(RN, -0x1.5b86ea8118a0e2bcp-1L, -0x1p+0L, 0x0p+0, INEXACT) +T(RN, -0x1.02239f3c6a8f13dep+3L, -0x1p+3L, 0x0p+0, 0) +T(RN, 0x1.161868e18bc67782p+2L, 0x1p+2L, 0x0p+0, 0) +T(RN, -0x1.0c34b3e01e6e682cp+3L, -0x1p+3L, 0x0p+0, 0) +T(RN, -0x1.a206f0a19dcc3948p+2L, -0x1.cp+2L, 0x0p+0, 0) +T(RN, 0x1.288bbb0d6a1e5bdap+3L, 0x1.2p+3L, 0x0p+0, 0) +T(RN, 0x1.52efd0cd80496a5ap-1L, 0x1p+0L, 0x0p+0, 0) +T(RN, -0x1.a05cc754481d0bdp-2L, -0x0p+0L, 0x0p+0, 0) +T(RN, 0x1.1f9ef934745cad6p-1L, 0x1p+0L, 0x0p+0, 0) +T(RN, 0x1.8c5db097f744257ep-1L, 0x1p+0L, 0x0p+0, 0) +T(RN, -0x1.5b86ea8118a0e2bcp-1L, -0x1p+0L, 0x0p+0, 0) diff --git a/src/math/scalb.c b/src/math/scalb.c index 3a4f578..133f077 100644 --- a/src/math/scalb.c +++ b/src/math/scalb.c @@ -19,14 +19,15 @@ int main(void) y = scalb(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s scalb(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s scalb(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s scalb(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s scalb(%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/scalbf.c b/src/math/scalbf.c index 2490325..6fe28a9 100644 --- a/src/math/scalbf.c +++ b/src/math/scalbf.c @@ -19,14 +19,15 @@ int main(void) y = scalbf(p->x, p->x2); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s scalbf(%a,%a)==%a except: want %s", rstr(p->r), p->x, p->x2, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s scalbf(%a,%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s scalbf(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s scalbf(%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/sin.c b/src/math/sin.c index d130d3f..0eb1b10 100644 --- a/src/math/sin.c +++ b/src/math/sin.c @@ -22,14 +22,15 @@ int main(void) y = sin(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s sin(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s sin(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s sin(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s sin(%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/sinf.c b/src/math/sinf.c index 1983701..efb695a 100644 --- a/src/math/sinf.c +++ b/src/math/sinf.c @@ -21,14 +21,15 @@ int main(void) y = sinf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s sinf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s sinf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s sinf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s sinf(%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/sinh.c b/src/math/sinh.c index 78632e7..d57f629 100644 --- a/src/math/sinh.c +++ b/src/math/sinh.c @@ -22,14 +22,15 @@ int main(void) y = sinh(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s sinh(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s sinh(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s sinh(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s sinh(%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/sinhf.c b/src/math/sinhf.c index 4188796..ba0556e 100644 --- a/src/math/sinhf.c +++ b/src/math/sinhf.c @@ -21,14 +21,15 @@ int main(void) y = sinhf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s sinhf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s sinhf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s sinhf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s sinhf(%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/sinhl.c b/src/math/sinhl.c index 99f6215..05b4adb 100644 --- a/src/math/sinhl.c +++ b/src/math/sinhl.c @@ -27,14 +27,15 @@ int main(void) y = sinhl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s sinhl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s sinhl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s sinhl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s sinhl(%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/sinl.c b/src/math/sinl.c index 5b29628..73ce9f0 100644 --- a/src/math/sinl.c +++ b/src/math/sinl.c @@ -27,14 +27,15 @@ int main(void) y = sinl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s sinl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s sinl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s sinl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s sinl(%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/sqrt.c b/src/math/sqrt.c index 797dba1..09dbb31 100644 --- a/src/math/sqrt.c +++ b/src/math/sqrt.c @@ -21,14 +21,15 @@ int main(void) y = sqrt(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s sqrt(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s sqrt(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s sqrt(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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 7015ffb..7c00fd0 100644 --- a/src/math/sqrtf.c +++ b/src/math/sqrtf.c @@ -21,14 +21,15 @@ int main(void) y = sqrtf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s sqrtf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s sqrtf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s sqrtf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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 d07fb43..4b8c9f4 100644 --- a/src/math/sqrtl.c +++ b/src/math/sqrtl.c @@ -26,14 +26,15 @@ int main(void) y = sqrtl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s sqrtl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s sqrtl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s sqrtl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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/tan.c b/src/math/tan.c index 5057e21..1751e6d 100644 --- a/src/math/tan.c +++ b/src/math/tan.c @@ -22,14 +22,15 @@ int main(void) y = tan(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s tan(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s tan(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s tan(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s tan(%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/tanf.c b/src/math/tanf.c index 5dc5687..4b69e6f 100644 --- a/src/math/tanf.c +++ b/src/math/tanf.c @@ -21,14 +21,15 @@ int main(void) y = tanf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s tanf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s tanf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s tanf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s tanf(%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/tanh.c b/src/math/tanh.c index 0c39c48..59d6676 100644 --- a/src/math/tanh.c +++ b/src/math/tanh.c @@ -21,14 +21,15 @@ int main(void) y = tanh(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s tanh(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s tanh(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s tanh(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s tanh(%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/tanhf.c b/src/math/tanhf.c index 26b6f40..3c46171 100644 --- a/src/math/tanhf.c +++ b/src/math/tanhf.c @@ -21,14 +21,15 @@ int main(void) y = tanhf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s tanhf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s tanhf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s tanhf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s tanhf(%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/tanhl.c b/src/math/tanhl.c index 2d65073..1f35a06 100644 --- a/src/math/tanhl.c +++ b/src/math/tanhl.c @@ -26,14 +26,15 @@ int main(void) y = tanhl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s tanhl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s tanhl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s tanhl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s tanhl(%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/tanl.c b/src/math/tanl.c index 79ac851..8165b36 100644 --- a/src/math/tanl.c +++ b/src/math/tanl.c @@ -27,14 +27,15 @@ int main(void) y = tanl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s tanl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s tanl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s tanl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s tanl(%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/tgamma.c b/src/math/tgamma.c index 3e4e2a5..d67270f 100644 --- a/src/math/tgamma.c +++ b/src/math/tgamma.c @@ -20,14 +20,15 @@ int main(void) y = tgamma(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s tgamma(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s tgamma(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s tgamma(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s tgamma(%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/tgammaf.c b/src/math/tgammaf.c index b72612d..424e3c7 100644 --- a/src/math/tgammaf.c +++ b/src/math/tgammaf.c @@ -20,14 +20,15 @@ int main(void) y = tgammaf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s tgammaf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s tgammaf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s tgammaf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s tgammaf(%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/tgammal.c b/src/math/tgammal.c index a004d6a..28bc4a8 100644 --- a/src/math/tgammal.c +++ b/src/math/tgammal.c @@ -25,14 +25,15 @@ int main(void) y = tgammal(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s tgammal(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s tgammal(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s tgammal(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s tgammal(%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 10b669e..5d09d84 100644 --- a/src/math/trunc.c +++ b/src/math/trunc.c @@ -20,14 +20,15 @@ int main(void) y = trunc(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s trunc(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s trunc(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s trunc(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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 4024273..5eebc7e 100644 --- a/src/math/truncf.c +++ b/src/math/truncf.c @@ -20,14 +20,15 @@ int main(void) y = truncf(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s truncf(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s truncf(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s truncf(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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 2b7596a..686343f 100644 --- a/src/math/truncl.c +++ b/src/math/truncl.c @@ -25,14 +25,15 @@ int main(void) y = truncl(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s truncl(%La)==%La except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s truncl(%La)=%La, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrl(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s truncl(%La) want %La got %La ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + 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/y0.c b/src/math/y0.c index 00df016..41edba4 100644 --- a/src/math/y0.c +++ b/src/math/y0.c @@ -20,14 +20,15 @@ int main(void) y = y0(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s y0(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s y0(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s y0(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s y0(%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/y0f.c b/src/math/y0f.c index 275691d..4ff83f7 100644 --- a/src/math/y0f.c +++ b/src/math/y0f.c @@ -20,14 +20,15 @@ int main(void) y = y0f(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s y0f(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s y0f(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s y0f(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s y0f(%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/y1.c b/src/math/y1.c index 5034b1a..166293b 100644 --- a/src/math/y1.c +++ b/src/math/y1.c @@ -20,14 +20,15 @@ int main(void) y = y1(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s y1(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s y1(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperr(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s y1(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s y1(%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/y1f.c b/src/math/y1f.c index 0cd9447..3498434 100644 --- a/src/math/y1f.c +++ b/src/math/y1f.c @@ -20,14 +20,15 @@ int main(void) y = y1f(p->x); e = getexcept(); if (!checkexcept(e, p->e, p->r)) { - printf("%s y1f(%a)==%a except: want %s", rstr(p->r), p->x, p->y, estr(p->e)); + printf("%s:%d: bad fp exception: %s y1f(%a)=%a, want %s", + p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e)); printf(" got %s\n", estr(e)); err++; } d = ulperrf(y, p->y, p->dy); if (!checkulp(d, p->r)) { - printf("%s y1f(%a) want %a got %a ulperr %.3f = %a + %a\n", - rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy); + printf("%s:%d: %s y1f(%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++; } } -- 2.20.1