xref: /csrg-svn/usr.bin/f77/libF77/d_abs.c (revision 22839)
110449Sdlw /*
2*22839Skre  * Copyright (c) 1980 Regents of the University of California.
3*22839Skre  * All rights reserved.  The Berkeley software License Agreement
4*22839Skre  * specifies the terms and conditions for redistribution.
5*22839Skre  *
6*22839Skre  *	@(#)d_abs.c	5.1	06/07/85
710449Sdlw  */
810449Sdlw 
910449Sdlw double d_abs(x)
1010449Sdlw double *x;
1110449Sdlw {
1210449Sdlw if(*x >= 0)
1310449Sdlw 	return(*x);
1410449Sdlw return(- *x);
1510449Sdlw }
16