X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmath%2Fasinl.c;h=1084c7912d8c2153931b5564cc26ca35db3afe9c;hb=713aa1df9c8a3b2a5515c862a06bdab47e20dcf2;hp=9fc09827b652b1bfadd95729c73ec2801a455f5f;hpb=457b0dbfc1d72080f6ba9fe47cd712e0f090732a;p=libc-test diff --git a/src/math/asinl.c b/src/math/asinl.c index 9fc0982..1084c79 100644 --- a/src/math/asinl.c +++ b/src/math/asinl.c @@ -16,6 +16,7 @@ static struct l_l t[] = { int main(void) { + #pragma STDC FENV_ACCESS ON long double y; float d; int e, i, err = 0; @@ -23,9 +24,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 = asinl(p->x); - e = getexcept(); + e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW); + if (!checkexcept(e, p->e, p->r)) { 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));