X-Git-Url: http://nsz.repo.hu/git/?p=libc-test;a=blobdiff_plain;f=src%2Fcommon%2Fmtest.h;fp=src%2Fcommon%2Fmtest.h;h=d390d03fcf79fb196a824a04b30fb2027f85689c;hp=9218a7538e1a7c39658668c663f3a0d5e019c475;hb=cda5e0484c98223a552580e79af378a6e6e83305;hpb=f9ba40bcb2e9cf0e51368d1144a000d1cc15ab9f diff --git a/src/common/mtest.h b/src/common/mtest.h index 9218a75..d390d03 100644 --- a/src/common/mtest.h +++ b/src/common/mtest.h @@ -102,10 +102,21 @@ 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