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 *****************************************************************/
21 _DEFUN (floorf
, (float),
26 if (x
> -1.0 && x
< 1.0)
27 return (x
>= 0 ? 0 : -1.0);
34 return (x
>= 0 ? f
: f
- 1.0);
37 #ifdef _DOUBLE_IS_32BITS
38 double floor (double x
)
40 return (double) floorf ((float) x
);
43 #endif /* defined(_DOUBLE_IS_32BITS) */