xref: /csrg-svn/usr.bin/f77/libF77/d_abs.c (revision 47940)
1*47940Sbostic /*-
2*47940Sbostic  * Copyright (c) 1980 The Regents of the University of California.
3*47940Sbostic  * All rights reserved.
422839Skre  *
5*47940Sbostic  * %sccs.include.proprietary.c%
610449Sdlw  */
710449Sdlw 
8*47940Sbostic #ifndef lint
9*47940Sbostic static char sccsid[] = "@(#)d_abs.c	5.2 (Berkeley) 04/12/91";
10*47940Sbostic #endif /* not lint */
11*47940Sbostic 
d_abs(x)1210449Sdlw double d_abs(x)
1310449Sdlw double *x;
1410449Sdlw {
1510449Sdlw if(*x >= 0)
1610449Sdlw 	return(*x);
1710449Sdlw return(- *x);
1810449Sdlw }
19