Function for generating values from exponential distributions

## Interface

exponential(r:real) : real

where `r>0.0`

. Gives a drawing from a exponential distribution with intensity `r`

.

Raises Exponential exception, if `r<=0.0`

.

## Characteristics

- Mean:
`1/r`

- Variance:
`1/r^2`

Density functions for exponential distributions:

## Example

exponential(1.0/4.0)

Customers arrive at a post office for service. The time between two arrivals has a mean of 4 minutes. The inter-arrival time has an exponential distribution with parameter `r=1/4`

.

You must be logged in to post a comment.