5 static struct l_li t[] = {
6 #if LDBL_MANT_DIG == 53
7 #include "sanity/lgamma_r.h"
8 #include "special/lgamma_r.h"
10 #elif LDBL_MANT_DIG == 64
11 #include "sanity/lgammal_r.h"
12 #include "special/lgammal_r.h"
19 #pragma STDC FENV_ACCESS ON
26 for (i = 0; i < sizeof t/sizeof *t; i++) {
32 feclearexcept(FE_ALL_EXCEPT);
33 y = lgammal_r(p->x, &yi);
34 e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
36 if (!checkexcept(e, p->e, p->r)) {
37 printf("%s:%d: bad fp exception: %s lgammal_r(%La)=%La,%lld, want %s",
38 p->file, p->line, rstr(p->r), p->x, p->y, p->i, estr(p->e));
39 printf(" got %s\n", estr(e));
42 d = ulperrl(y, p->y, p->dy);
43 if (!checkulp(d, p->r) || yi != p->i) {
44 printf("%s:%d: %s lgammal_r(%La) want %La,%lld got %La,%d ulperr %.3f = %a + %a\n",
45 p->file, p->line, rstr(p->r), p->x, p->y, p->i, y, yi, d, d-p->dy, p->dy);