| Contributed by Danny Smith <dannysmith@users.sourceforge.net>
|
| No copyright claimed, absolutely no warranties.
|
| nextafterl (long double x, long double y)
|
| unsigned long long mantissa;
|
| } __attribute__ ((packed)) parts;
|
| /* The normal bit is explicit for long doubles, unlike
|
| static const unsigned long long normal_bit = 0x8000000000000000ull;
|
| if (isnan (y) || isnan (x))
|
| /* nextafter (0.0, -O.0) should return -0.0. */
|
| return y > 0.0L ? u.ld : -u.ld;
|
| if (((x > 0.0L) ^ (y > x)) == 0)
|
| if ((u.parts.mantissa & ~normal_bit) == 0ull)
|
| if ((u.parts.mantissa & ~normal_bit) == 0ull)
|
| /* If we have updated the expn of a normal number,
|
| or moved from denormal to normal, [re]set the normal bit. */
|
| if (u.parts.expn & 0x7fff)
|
| u.parts.mantissa |= normal_bit;
|
| /* nexttowardl is the same function with a different name. */
|
| nexttowardl (long double, long double) __attribute__ ((alias("nextafterl")));
|