File:  [RetroPC.NET] / xmil / palm / support_files / fdlibm / s_fabs.c
Revision 1.1: download - view: text, annotated - select for diffs
Tue Feb 8 03:33:10 2005 JST (20 years, 8 months ago) by tk800
Branches: MAIN
CVS tags: HEAD
add fdlibm source files[palm](tk800)


/* @(#)s_fabs.c 1.3 95/01/18 */
/*
 * ====================================================
 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
 *
 * Developed at SunSoft, a Sun Microsystems, Inc. business.
 * Permission to use, copy, modify, and distribute this
 * software is freely granted, provided that this notice 
 * is preserved.
 * ====================================================
 */

/*
 * fabs(x) returns the absolute value of x.
 */

#include "fdlibm.h"

#ifdef __STDC__
	double fabs(double x)
#else
	double fabs(x)
	double x;
#endif
{
#ifndef	PALMOS
	__HI(x) &= 0x7fffffff;
#else
	double4s	di;
	di.d = x;di.i.h &= 0x7fffffff;x = di.d;
#endif
        return x;
}

RetroPC.NET-CVS <cvs@retropc.net>