xref: /csrg-svn/usr.bin/pascal/libpc/COS.c (revision 40865)
1*40865Sbostic /*-
2*40865Sbostic  * Copyright (c) 1982 The Regents of the University of California.
3*40865Sbostic  * All rights reserved.
4*40865Sbostic  *
5*40865Sbostic  * %sccs.include.redist.c%
6*40865Sbostic  */
75720Smckusick 
8*40865Sbostic #ifndef lint
9*40865Sbostic static char sccsid[] = "@(#)COS.c	1.3 (Berkeley) 04/09/90";
10*40865Sbostic #endif /* not lint */
115720Smckusick 
125720Smckusick #include <math.h>
135720Smckusick extern int errno;
145720Smckusick 
155720Smckusick double
165720Smckusick COS(value)
175720Smckusick 	double	value;
185720Smckusick {
195720Smckusick 	double result;
205720Smckusick 
215720Smckusick 	errno = 0;
225720Smckusick 	result = cos(value);
235720Smckusick 	if (errno != 0) {
245720Smckusick 		ERROR("Cannot compute cos(%e)\n", value);
255720Smckusick 	}
265720Smckusick 	return result;
275720Smckusick }
28