xref: /csrg-svn/usr.bin/pascal/libpc/SQRT.c (revision 40865)
1*40865Sbostic /*-
2*40865Sbostic  * Copyright (c) 1979 The Regents of the University of California.
3*40865Sbostic  * All rights reserved.
4*40865Sbostic  *
5*40865Sbostic  * %sccs.include.redist.c%
6*40865Sbostic  */
71702Smckusick 
8*40865Sbostic #ifndef lint
9*40865Sbostic static char sccsid[] = "@(#)SQRT.c	1.5 (Berkeley) 04/09/90";
10*40865Sbostic #endif /* not lint */
111702Smckusick 
121818Smckusic #include <math.h>
131702Smckusick 
141702Smckusick double
151702Smckusick SQRT(value)
161702Smckusick 
171702Smckusick 	double	value;
181702Smckusick {
191818Smckusic 	if (value < 0) {
203869Smckusic 		ERROR("Negative argument of %e to sqrt\n", value);
211702Smckusick 	}
221702Smckusick 	return sqrt(value);
231702Smckusick }
24