1 #define _DEFAULT_SOURCE 1
8 static struct f_f t[] = {
9 #include "sanity/j1f.h"
10 #include "special/j1f.h"
16 #pragma STDC FENV_ACCESS ON
22 for (i = 0; i < sizeof t/sizeof *t; i++) {
28 feclearexcept(FE_ALL_EXCEPT);
30 e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
32 if (!checkexcept(e, p->e, p->r)) {
33 printf("%s:%d: bad fp exception: %s j1f(%a)=%a, want %s",
34 p->file, p->line, rstr(p->r), p->x, p->y, estr(p->e));
35 printf(" got %s\n", estr(e));
38 d = ulperrf(y, p->y, p->dy);
39 if (!checkulp(d, p->r)) {
40 printf("%s:%d: %s j1f(%a) want %a got %a ulperr %.3f = %a + %a\n",
41 p->file, p->line, rstr(p->r), p->x, p->y, y, d, d-p->dy, p->dy);