xref: /csrg-svn/usr.bin/pascal/libpc/COS.c (revision 62092)
140865Sbostic /*-
2*62092Sbostic  * Copyright (c) 1982, 1993
3*62092Sbostic  *	The Regents of the University of California.  All rights reserved.
440865Sbostic  *
540865Sbostic  * %sccs.include.redist.c%
640865Sbostic  */
75720Smckusick 
840865Sbostic #ifndef lint
9*62092Sbostic static char sccsid[] = "@(#)COS.c	8.1 (Berkeley) 06/06/93";
1040865Sbostic #endif /* not lint */
115720Smckusick 
125720Smckusick #include <math.h>
135720Smckusick extern int errno;
145720Smckusick 
155720Smckusick double
COS(value)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