X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Fgen%2Ftemplate%2Fll_l.c;h=962cce4d3fd959e2afc4ca8bebfb02e6ae54fb87;hb=fd13cb9d081d7cc2355fc34805377e88399a7534;hp=09178bd0ae34ce7a69e4f2f8c2995c45c8877d25;hpb=457b0dbfc1d72080f6ba9fe47cd712e0f090732a;p=libc-test diff --git a/src/math/gen/template/ll_l.c b/src/math/gen/template/ll_l.c index 09178bd..962cce4 100644 --- a/src/math/gen/template/ll_l.c +++ b/src/math/gen/template/ll_l.c @@ -12,6 +12,7 @@ HEADERS int main(void) { + #pragma STDC FENV_ACCESS ON long double y; float d; int e, i, err = 0; @@ -19,9 +20,14 @@ int main(void) for (i = 0; i < sizeof t/sizeof *t; i++) { p = t + i; - setupfenv(p->r); + + if (p->r < 0) + continue; + fesetround(p->r); + feclearexcept(FE_ALL_EXCEPT); y = ___(p->x, p->x2); - e = getexcept(); + e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW); + if (!checkexcept(e, p->e, p->r)) { 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));