xref: /csrg-svn/usr.bin/pascal/libpc/EXP.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  */
75721Smckusick 
840865Sbostic #ifndef lint
9*62092Sbostic static char sccsid[] = "@(#)EXP.c	8.1 (Berkeley) 06/06/93";
1040865Sbostic #endif /* not lint */
115721Smckusick 
125721Smckusick #include <math.h>
135721Smckusick extern int errno;
145721Smckusick 
155721Smckusick double
EXP(value)165721Smckusick EXP(value)
175721Smckusick 	double	value;
185721Smckusick {
195721Smckusick 	double result;
205721Smckusick 
215721Smckusick 	errno = 0;
225721Smckusick 	result = exp(value);
235721Smckusick 	if (errno != 0) {
245721Smckusick 		ERROR("exp(%e) yields a result that is out of the range of reals\n", value);
255721Smckusick 	}
265721Smckusick 	return result;
275721Smckusick }
28