12 long double tl
= (long double) FLT_MAX
+ 0x1.0p128L
;
15 feclearexcept (FE_ALL_EXCEPT
);
16 if (nexttowardf (m
, tl
) != fi
)
18 puts ("nexttowardf+ failed");
21 if (fetestexcept (FE_OVERFLOW
) == 0)
23 puts ("nexttowardf+ did not overflow");
26 feclearexcept (FE_ALL_EXCEPT
);
27 if (nexttowardf (-m
, -tl
) != -fi
)
29 puts ("nexttowardf- failed");
32 if (fetestexcept (FE_OVERFLOW
) == 0)
34 puts ("nexttowardf- did not overflow");
38 tl
= (long double) DBL_MAX
+ 1.0e305L
;
41 feclearexcept (FE_ALL_EXCEPT
);
42 if (nexttoward (dm
, tl
) != di
)
44 puts ("nexttoward+ failed");
47 if (fetestexcept (FE_OVERFLOW
) == 0)
49 puts ("nexttoward+ did not overflow");
52 feclearexcept (FE_ALL_EXCEPT
);
53 if (nexttoward (-dm
, -tl
) != -di
)
55 puts ("nexttoward- failed");
58 if (fetestexcept (FE_OVERFLOW
) == 0)
60 puts ("nexttoward- did not overflow");