written by Kirk McKusick; add Berkeley specific copyright notice
[unix-history] / usr / src / usr.bin / pascal / libpc / EXP.c
CommitLineData
0d78ca85
KB
1/*-
2 * Copyright (c) 1982 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * %sccs.include.redist.c%
6 */
c3c579a2 7
0d78ca85
KB
8#ifndef lint
9static char sccsid[] = "@(#)EXP.c 1.3 (Berkeley) %G%";
10#endif /* not lint */
c3c579a2
KM
11
12#include <math.h>
13extern int errno;
14
15double
16EXP(value)
17 double value;
18{
19 double result;
20
21 errno = 0;
22 result = exp(value);
23 if (errno != 0) {
24 ERROR("exp(%e) yields a result that is out of the range of reals\n", value);
c3c579a2
KM
25 }
26 return result;
27}