X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Fsinhf.c;h=8126f5d6dc703e46bdc943a8bbae255f831d7b02;hb=b76071f55afbc307d8922b195cbc8f5eaa8a773d;hp=ba0556e1ad5778844b272eec96659d6e0880e106;hpb=457b0dbfc1d72080f6ba9fe47cd712e0f090732a;p=libc-test diff --git a/src/math/sinhf.c b/src/math/sinhf.c index ba0556e..8126f5d 100644 --- a/src/math/sinhf.c +++ b/src/math/sinhf.c @@ -1,15 +1,17 @@ #include #include -#include "util.h" +#include "mtest.h" static struct f_f t[] = { #include "ucb/sinhf.h" #include "sanity/sinhf.h" +#include "special/sinhf.h" }; int main(void) { + #pragma STDC FENV_ACCESS ON float y; float d; int e, i, err = 0; @@ -17,9 +19,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 = sinhf(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 sinhf(%a)=%a, want %s", p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));