5 static struct ll_l t[] = {
6 #if LDBL_MANT_DIG == 53
8 #include "sanity/hypot.h"
10 #elif LDBL_MANT_DIG == 64
11 #include "sanity/hypotl.h"
18 #pragma STDC FENV_ACCESS ON
24 for (i = 0; i < sizeof t/sizeof *t; i++) {
30 feclearexcept(FE_ALL_EXCEPT);
31 y = hypotl(p->x, p->x2);
32 e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
34 if (!checkexcept(e, p->e, p->r)) {
35 printf("%s:%d: bad fp exception: %s hypotl(%La,%La)=%La, want %s",
36 p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
37 printf(" got %s\n", estr(e));
40 d = ulperrl(y, p->y, p->dy);
41 if (!checkulp(d, p->r)) {
42 printf("%s:%d: %s hypotl(%La,%La) want %La got %La ulperr %.3f = %a + %a\n",
43 p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy);