X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fcommon%2Fmtest.h;h=706c1ba23ea8989b17a2f72ed1a919e187c06b6a;hb=75543c20a003e3108b51cb63998752d27621f993;hp=9218a7538e1a7c39658668c663f3a0d5e019c475;hpb=cfa23cc1bd01f5c44d7746b8b1839f84d5e1b6eb;p=libc-test diff --git a/src/common/mtest.h b/src/common/mtest.h index 9218a75..706c1ba 100644 --- a/src/common/mtest.h +++ b/src/common/mtest.h @@ -102,16 +102,28 @@ float ulperrl(long double got, long double want, float dwant); static int checkexcept(int got, int want, int r) { if (r == RN) +#if defined CHECK_INEXACT + return got == want; +#elif defined CHECK_INEXACT_OMISSION return got == want || got == (want|INEXACT); +#else + return (got|INEXACT) == (want|INEXACT); +#endif return (got|INEXACT|UNDERFLOW) == (want|INEXACT|UNDERFLOW); } +static int checkexceptall(int got, int want, int r) +{ + return got == want; +} + static int checkulp(float d, int r) { // TODO: we only care about >=1.5 ulp errors for now, should be 1.0 if (r == RN) return fabsf(d) < 1.5; - return 1; + // accept larger error in non-nearest rounding mode + return fabsf(d) < 3.0; } static int checkcr(long double y, long double ywant, int r)