5 static struct li_l t[] = {
6 #if LDBL_MANT_DIG == 53
7 #include "sanity/ldexp.h"
9 #elif LDBL_MANT_DIG == 64
10 #include "sanity/ldexpl.h"
17 #pragma STDC FENV_ACCESS ON
23 for (i = 0; i < sizeof t/sizeof *t; i++) {
29 feclearexcept(FE_ALL_EXCEPT);
30 y = ldexpl(p->x, p->i);
31 e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
33 if (!checkexcept(e, p->e, p->r)) {
34 printf("%s:%d: bad fp exception: %s ldexpl(%La, %lld)=%La, want %s",
35 p->file, p->line, rstr(p->r), p->x, p->i, p->y, estr(p->e));
36 printf(" got %s\n", estr(e));
39 d = ulperrl(y, p->y, p->dy);
40 if (!checkcr(y, p->y, p->r)) {
41 printf("%s:%d: %s ldexpl(%La, %lld) want %La got %La ulperr %.3f = %a + %a\n",
42 p->file, p->line, rstr(p->r), p->x, p->i, p->y, y, d, d-p->dy, p->dy);