result = FUNC(modf) (89.6, &intpart); check_eps ("modf (89.6, &x) returns 0.6", result, 0.6, CHOOSE(6e-15L, 6e-15, 2e-6)); check ("modf (89.6, &x) sets x to 89", intpart, 89);
modf_test (void){  MATHTYPE result, intpart;  result = FUNC(modf) (plus_infty, &intpart);  check ("modf (+inf, &x) returns +0", result, 0);  check_isinfp ("modf (+inf, &x) set x to +inf", intpart);  result = FUNC(modf) (minus_infty, &intpart);  check ("modf (-inf, &x) returns -0", result, minus_zero);  check_isinfn ("modf (-inf, &x) sets x to -inf", intpart);  result = FUNC(modf) (nan_value, &intpart);  check_isnan ("modf (NaN, &x) returns NaN", result);  check_isnan ("modf (NaN, &x) sets x to NaN", intpart);  result = FUNC(modf) (0, &intpart);  check ("modf (0, &x) returns 0", result, 0);  check ("modf (0, &x) sets x to 0", intpart, 0);  result = FUNC(modf) (minus_zero, &intpart);  check ("modf (-0, &x) returns -0", result, minus_zero);  check ("modf (-0, &x) sets x to -0", intpart, minus_zero);  result = FUNC(modf) (2.5, &intpart);  check ("modf (2.5, &x) returns 0.5", result, 0.5);  check ("modf (2.5, &x) sets x to 2", intpart, 2);  result = FUNC(modf) (-2.5, &intpart);  check ("modf (-2.5, &x) returns -0.5", result, -0.5);  check ("modf (-2.5, &x) sets x to -2", intpart, -2);  result = FUNC(modf) (20, &intpart);  check ("modf (20, &x) returns 0", result, 0);  check ("modf (20, &x) sets x to 20", intpart, 20);  result = FUNC(modf) (21, &intpart);  check ("modf (21, &x) returns 0", result, 0);  check ("modf (21, &x) sets x to 21", intpart, 21);}