exp()
log()
pow()
mymaths.c - wrappers for standard maths functions
Version Tag $Id: mymaths.c,v 1.24 2006/02/06 19:55:46 db60 Exp $
Provides wrappers for mathematical functions in the standard library.
These wrappers include error handling in the sense that they crash
verbosely if the standard library function signifies an error through
errno
or its return value.
exp()
double exp_wrapper(double x1);
Calculates natural antilog of a number, or crashes verbosely on underflow, overflow or domain error.
The number whose antilogarithm we wish to calculate.
Returns e**x1
.
log()
double log_wrapper(double x2);
Calculates natural logarithm of a number, or crashes verbosely on domain error.
The number whose natural logarithm we wish to calculate.
Returns ln(x2
).
pow()
double pow_wrapper(double x3, double y);
Raises one number to the power of another, or crashes verbosely on domain error, range error or underflow.
The number to be raised to the power of y
.
The number to the power of which x3
is to be raised.