- /*
- * argument reduction, make sure inexact flag not raised if input
- * is an integer
- */
- z = floorl(y);
- if (z != y) { /* inexact anyway */
- y *= 0.5;
- y = 2.0*(y - floorl(y));/* y = |x| mod 2.0 */
- n = (int) (y*4.0);
- } else {
- if (ix >= 0x403f8000) { /* 2^64 */
- y = 0.0; /* y must be even */
- n = 0;
- } else {
- if (ix < 0x403e8000) /* 2^63 */
- z = y + two63; /* exact */
- u.f = z;
- n = u.i.m & 1;
- y = n;
- n <<= 2;
- }
- }