1 /* derived from /netlib/fdlibm */ 2 3 /* @(#)s_fabs.c 1.3 95/01/18 */ 4 /* 5 * ==================================================== 6 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 7 * 8 * Developed at SunSoft, a Sun Microsystems, Inc. business. 9 * Permission to use, copy, modify, and distribute this 10 * software is freely granted, provided that this notice 11 * is preserved. 12 * ==================================================== 13 */ 14 15 /* 16 * fabs(x) returns the absolute value of x. 17 */ 18 19 #include "fdlibm.h" 20 21 double fabs(double x) 22 { 23 __HI(x) &= 0x7fffffff; 24 return x; 25 } 26