Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_FS_1_19910112 - kcc-5/lib/math/fabs.c
There are 7 other files named fabs.c in the archive. Click here to see a list.
/*
 *	FABS.C - double-precision floating-point absolute value
 *
 *	This code conforms with the description of the fabs function
 *	as defined in Harbison and Steele's "C: A Reference Manual",
 *	section 11.3.10
 *
 *	This is implemented as a function instead of a macro like
 *
 *		#define fabs(x)	((x) < 0) ? -(x) : (x))
 *
 *	because of the side-effect difference in a case like fabs(n++)
 */

double fabs(x)
double x;
{
	return (x < 0) ? -x : x;
}