Message ID | alpine.DEB.2.10.1509152048320.16292@digraph.polyomino.org.uk |
---|---|
State | New |
Headers | show |
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c b/sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c index 5f92a5f..99f4747 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c @@ -36,7 +36,9 @@ __nearbyintl (long double x) union ibm_extended_long_double u; u.ld = x; - if (fabs (u.d[0].d) < TWO52) + if (!isfinite (u.d[0].d)) + return x; + else if (fabs (u.d[0].d) < TWO52) { double xh = u.d[0].d; double high = u.d[0].d;