- NAME
- DESCRIPTION
- exp_wrapper - INTERFACE TO `exp()`

- SYNOPSIS
- DESCRIPTION
- PARAMETERS

- INPUT

- RETURN

- log_wrapper - INTERFACE TO `log()`

- SYNOPSIS
- DESCRIPTION
- PARAMETERS

- INPUT

- RETURN

- pow_wrapper - interface to `pow()`

- SYNOPSIS
- DESCRIPTION
- PARAMETERS

- INPUT

- RETURN

# NAME

mymaths.c - wrappers for standard maths functions

Version Tag $Id: mymaths.c,v 1.24 2006/02/06 19:55:46 db60 Exp $

# DESCRIPTION

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_wrapper - INTERFACE TO `exp()`

## SYNOPSIS

        double exp_wrapper(double x1);

## DESCRIPTION

Calculates natural antilog of a number, or crashes verbosely on underflow, overflow or domain error.

## PARAMETERS

### INPUT

x1

  The number whose antilogarithm we wish to calculate.

## RETURN

Returns e**`x1`.

# log_wrapper - INTERFACE TO `log()`

## SYNOPSIS

        double log_wrapper(double x2);

## DESCRIPTION

Calculates natural logarithm of a number, or crashes verbosely on domain error.

## PARAMETERS

### INPUT

x2

  The number whose natural logarithm we wish to calculate.

## RETURN

Returns ln(`x2`).

# pow_wrapper - interface to `pow()`

## SYNOPSIS

        double pow_wrapper(double x3, double y);

## DESCRIPTION

Raises one number to the power of another, or crashes verbosely on domain error, range error or underflow.

## PARAMETERS

### INPUT

x3

  The number to be raised to the power of `y`.

y

  The number to the power of which `x3` is to be raised.

## RETURN

Returns `x3`**`y`.