5 static struct l_i t
[] = {
6 #if LDBL_MANT_DIG == 53
7 #include "sanity/lround.h"
8 #include "special/lround.h"
10 #elif LDBL_MANT_DIG == 64
11 #include "sanity/lroundl.h"
12 #include "special/lroundl.h"
19 #pragma STDC FENV_ACCESS ON
24 for (i
= 0; i
< sizeof t
/sizeof *t
; i
++) {
30 feclearexcept(FE_ALL_EXCEPT
);
32 e
= fetestexcept(INEXACT
|INVALID
|DIVBYZERO
|UNDERFLOW
|OVERFLOW
);
34 if (!checkexcept(e
, p
->e
, p
->r
)) {
35 printf("%s:%d: bad fp exception: %s lroundl(%La)=%lld, want %s",
36 p
->file
, p
->line
, rstr(p
->r
), p
->x
, p
->i
, estr(p
->e
));
37 printf(" got %s\n", estr(e
));
40 if (!(p
->e
&INVALID
) && yi
!= p
->i
) {
41 printf("%s:%d: %s lroundl(%La) want %lld got %lld\n",
42 p
->file
, p
->line
, rstr(p
->r
), p
->x
, p
->i
, yi
);