xref: /csrg-svn/usr.bin/pascal/libpc/ATAN.c (revision 5718)
1*5718Smckusick /* Copyright (c) 1982 Regents of the University of California */
2*5718Smckusick 
3*5718Smckusick static char sccsid[] = "@(#)ATAN.c 1.1 02/08/82";
4*5718Smckusick 
5*5718Smckusick #include <math.h>
6*5718Smckusick extern int errno;
7*5718Smckusick 
8*5718Smckusick double
9*5718Smckusick ATAN(value)
10*5718Smckusick 	double	value;
11*5718Smckusick {
12*5718Smckusick 	double result;
13*5718Smckusick 
14*5718Smckusick 	errno = 0;
15*5718Smckusick 	result = atan(value);
16*5718Smckusick 	if (errno != 0) {
17*5718Smckusick 		ERROR("Argument %e is out of the domain of atan\n", value);
18*5718Smckusick 		return;
19*5718Smckusick 	}
20*5718Smckusick 	return result;
21*5718Smckusick }
22