2 /* @(#)z_fabsf.c 1.0 98/08/13 */
3 /******************************************************************
4 * Floating-Point Absolute Value
7 * x - floating-point number
13 * fabs computes the absolute value of a floating point number.
15 *****************************************************************/
21 _DEFUN (fabsf
, (float),
35 return (x
< 0.0 ? -x
: x
);
39 #ifdef _DOUBLE_IS_32BITS
40 double fabs (double x
)
42 return (double) fabsf ((float) x
);
45 #endif /* defined(_DOUBLE_IS_32BITS) */