<commit_before># Exponential Random Numbers

> [Exponentially][exponential] distributed pseudorandom numbers.


<section class="usage">

## Usage

``` javascript
var exponential = require( '@stdlib/math/base/random/exponential' );
```

#### exponential( lambda )

Returns a pseudorandom number drawn from an [exponential][exponential] distribution with rate parameter `lambda`.

``` javascript
var r = exponential( 7.9 );
// returns <number>
```

If `lambda <= 0` or `lambda` is `NaN`, the function returns `NaN`.

``` javascript
var r = exponential( -2.0 );
// returns NaN

r = exponential( NaN );
// returns NaN
```

#### exponential.factory( \[lambda, \]\[options\] )

Returns a pseudorandom number generator (PRNG) for generating pseudorandom numbers drawn from an [exponential][exponential] distribution.

``` javascript
var rand = exponential.factory();

var r = rand( 5.0 );
// returns <number>
```

If provided `lambda`, the returned generator returns random variates from the specified distribution.

``` javascript
var rand = exponential.factory( 10.0 );

var r = rand();
// returns <number>

r = rand();
// returns <number>
```

If not provided `lambda`, the returned generator requires that `lambda` be provided at each invocation.

``` javascript
var rand = exponential.factory();

var r = rand( 4.0 );
// returns <number>

r = rand( 3.14 );
// returns <number>
```

The function accepts the following `options`:

* __seed__: pseudorandom number generator seed.

To seed a pseudorandom number generator, set the `seed` option.

``` javascript
var rand = exponential.factory({
    'seed': 12345
});

var r = rand( 3.0 );
// returns <number>

rand = exponential.factory( 4.5, {
    'seed': 12345
});

r = rand();
// returns <number>
```

#### exponential.NAME

The generator name.

``` javascript
var name = exponential.NAME;<commit_msg>Rename variable<commit_after># Exponential Random Numbers

> [Exponentially][exponential] distributed pseudorandom numbers.


<section class="usage">

## Usage

``` javascript
var exponential = require( '@stdlib/math/base/random/exponential' );
```

#### exponential( lambda )

Returns a pseudorandom number drawn from an [exponential][exponential] distribution with rate parameter `lambda`.

``` javascript
var r = exponential( 7.9 );
// returns <number>
```

If `lambda <= 0` or `lambda` is `NaN`, the function returns `NaN`.

``` javascript
var r = exponential( -2.0 );
// returns NaN

r = exponential( NaN );
// returns NaN
```

#### exponential.factory( \[lambda, \]\[options\] )

Returns a pseudorandom number generator (PRNG) for generating pseudorandom numbers drawn from an [exponential][exponential] distribution.

``` javascript
var rand = exponential.factory();

var r = rand( 5.0 );
// returns <number>
```

If provided `lambda`, the returned generator returns random variates from the specified distribution.

``` javascript
var rand = exponential.factory( 10.0 );

var r = rand();
// returns <number>

r = rand();
// returns <number>
```

If not provided `lambda`, the returned generator requires that `lambda` be provided at each invocation.

``` javascript
var rand = exponential.factory();

var r = rand( 4.0 );
// returns <number>

r = rand( 3.14 );
// returns <number>
```

The function accepts the following `options`:

* __seed__: pseudorandom number generator seed.

To seed a pseudorandom number generator, set the `seed` option.

``` javascript
var rand = exponential.factory({
    'seed': 12345
});

var r = rand( 3.0 );
// returns <number>

rand = exponential.factory( 4.5, {
    'seed': 12345
});

r = rand();
// returns <number>
```

#### exponential.NAME

The generator name.

``` javascript
var str = exponential.NAME;
{'fraction_non_alphanumeric': 0.14660535569380578, 'fraction_numerical': 0.015688395996754124, 'mean_word_length': 4.22316384180791, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1217552', 'n_tokens_mistral': 1193, 'n_tokens_neox': 1051, 'n_words': 392}