2 /* @(#)z_floorf.c 1.0 98/08/13 */
3 /*****************************************************************
7 * x - floating point value
10 * Smallest integer less than x.
13 * This routine returns the smallest integer less than x.
15 *****************************************************************/
25 if (x
> -1.0 && x
< 1.0)
26 return (x
>= 0 ? 0 : -1.0);
33 return (x
>= 0 ? f
: f
- 1.0);
36 #ifdef _DOUBLE_IS_32BITS
37 double floor (double x
)
39 return (double) floorf ((float) x
);
42 #endif /* defined(_DOUBLE_IS_32BITS) */