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