5 static struct lll_l t
[] = {
6 #if LDBL_MANT_DIG == 53
7 #include "sanity/fma.h"
8 #include "special/fma.h"
9 #elif LDBL_MANT_DIG == 64
10 #include "sanity/fmal.h"
11 #include "special/fmal.h"
17 #pragma STDC FENV_ACCESS ON
23 for (i
= 0; i
< sizeof t
/sizeof *t
; i
++) {
29 feclearexcept(FE_ALL_EXCEPT
);
30 y
= fmal(p
->x
, p
->x2
, p
->x3
);
31 e
= fetestexcept(INEXACT
|INVALID
|DIVBYZERO
|UNDERFLOW
|OVERFLOW
);
33 /* do not check inexact by default */
34 #if defined CHECK_INEXACT || defined CHECK_INEXACT_OMISSION
35 if (!checkexceptall(e
, p
->e
, p
->r
)) {
37 if (!checkexceptall(e
|INEXACT
, p
->e
|INEXACT
, p
->r
)) {
39 printf("%s:%d: bad fp exception: %s fmal(%La,%La,%La)=%La, want %s",
40 p
->file
, p
->line
, rstr(p
->r
), p
->x
, p
->x2
, p
->x3
, p
->y
, estr(p
->e
));
41 printf(" got %s\n", estr(e
));
44 d
= ulperrl(y
, p
->y
, p
->dy
);
45 if (!checkcr(y
, p
->y
, p
->r
)) {
46 printf("%s:%d: %s fmal(%La,%La,%La) want %La got %La ulperr %.3f = %a + %a\n",
47 p
->file
, p
->line
, rstr(p
->r
), p
->x
, p
->x2
, p
->x3
, p
->y
, y
, d
, d
-p
->dy
, p
->dy
);