3 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
4 long double nextafterl(long double x
, long double y
)
6 return nextafter(x
, y
);
8 #elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384
9 long double nextafterl(long double x
, long double y
)
13 if (isnan(x
) || isnan(y
))
21 ux
.i
.se
= uy
.i
.se
& 0x8000;
22 } else if ((x
< y
) == !(ux
.i
.se
& 0x8000)) {
24 if (ux
.i
.m
<< 1 == 0) {
29 if (ux
.i
.m
<< 1 == 0) {
36 /* raise overflow if ux is infinite and x is finite */
37 if ((ux
.i
.se
& 0x7fff) == 0x7fff)
39 /* raise underflow if ux is subnormal or zero */
40 if ((ux
.i
.se
& 0x7fff) == 0)
41 FORCE_EVAL(x
*x
+ ux
.f
*ux
.f
);
44 #elif LDBL_MANT_DIG == 113 && LDBL_MAX_EXP == 16384
45 long double nextafterl(long double x
, long double y
)
49 if (isnan(x
) || isnan(y
))
57 ux
.i
.se
= uy
.i
.se
& 0x8000;
58 } else if ((x
< y
) == !(ux
.i
.se
& 0x8000)) {
67 /* raise overflow if ux is infinite and x is finite */
68 if ((ux
.i
.se
& 0x7fff) == 0x7fff)
70 /* raise underflow if ux is subnormal or zero */
71 if ((ux
.i
.se
& 0x7fff) == 0)
72 FORCE_EVAL(x
*x
+ ux
.f
*ux
.f
);