Skip to content

Commit 9b99b53

Browse files
new API prioritised
1 parent 3ae8b58 commit 9b99b53

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

doc/specs/stdlib_stats_distribution_exponential.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ The algorithm used for generating exponential random variates is fundamentally l
3434

3535
### Syntax
3636

37-
`result = ` [[stdlib_stats_distribution_exponential(module):rvs_exp(interface)]] `([lambda] [[, array_size]])`
37+
`result = ` [[stdlib_stats_distribution_exponential(module):rvs_exp(interface)]] `([loc, scale] [[, array_size]])`
3838

3939
or
4040

41-
`result = ` [[stdlib_stats_distribution_exponential(module):rvs_exp(interface)]] `([loc, scale] [[, array_size]])`
41+
`result = ` [[stdlib_stats_distribution_exponential(module):rvs_exp(interface)]] `([lambda] [[, array_size]])`
4242

4343
### Class
4444

@@ -90,11 +90,11 @@ Instead of of the inverse scale parameter `lambda`, it is possible to pass `loc`
9090

9191
### Syntax
9292

93-
`result = ` [[stdlib_stats_distribution_exponential(module):pdf_exp(interface)]] `(x, lambda)`
93+
`result = ` [[stdlib_stats_distribution_exponential(module):pdf_exp(interface)]] `(x, loc, scale)`
9494

9595
or
9696

97-
`result = ` [[stdlib_stats_distribution_exponential(module):pdf_exp(interface)]] `(x, loc, scale)`
97+
`result = ` [[stdlib_stats_distribution_exponential(module):pdf_exp(interface)]] `(x, lambda)`
9898

9999
### Class
100100

@@ -145,11 +145,11 @@ Alternative to the inverse scale parameter `lambda`, it is possible to pass `loc
145145

146146
### Syntax
147147

148-
`result = ` [[stdlib_stats_distribution_exponential(module):cdf_exp(interface)]] `(x, lambda)`
148+
`result = ` [[stdlib_stats_distribution_exponential(module):cdf_exp(interface)]] `(x, loc, scale)`
149149

150150
or
151151

152-
`result = ` [[stdlib_stats_distribution_exponential(module):cdf_exp(interface)]] `(x, loc, scale)`
152+
`result = ` [[stdlib_stats_distribution_exponential(module):cdf_exp(interface)]] `(x, lambda)`
153153

154154
### Class
155155

example/stats_distribution_exponential/example_exponential_cdf.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ program example_exponential_cdf
1212
seed_put = 1234567
1313
call random_seed(seed_put, seed_get)
1414

15-
! standard exponential cumulative distribution at x=1.0 with lambda=1.0
16-
print *, exp_cdf(1.0, 1.0)
17-
! 0.632120550
18-
1915
! standard exponential cumulative distribution at x=1.0 with loc=0.0, scale=1.0
2016
print *, exp_cdf(1.0, 0.0, 1.0)
2117
! 0.632120550
2218

19+
! standard exponential cumulative distribution at x=1.0 with lambda=1.0
20+
print *, exp_cdf(1.0, 1.0)
21+
! 0.632120550
22+
2323
! cumulative distribution at x=2.0 with lambda=2
2424
print *, exp_cdf(2.0, 2.0)
2525
! 0.981684387

example/stats_distribution_exponential/example_exponential_pdf.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ program example_exponential_pdf
1212
seed_put = 1234567
1313
call random_seed(seed_put, seed_get)
1414

15-
! probability density at x=1.0 with lambda=1.0
16-
print *, exp_pdf(1.0, 1.0)
17-
! 0.367879450
18-
1915
! probability density at x=1.0 with loc=0 and scale=1.0
2016
print *, exp_pdf(1.0, 0.0, 1.0)
2117
! 0.367879450
2218

19+
! probability density at x=1.0 with lambda=1.0
20+
print *, exp_pdf(1.0, 1.0)
21+
! 0.367879450
22+
2323
! probability density at x=2.0 with lambda=2.0
2424
print *, exp_pdf(2.0, 2.0)
2525
! 3.66312787E-02

example/stats_distribution_exponential/example_exponential_rvs.f90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ program example_exponential_rvs
99
seed_put = 1234567
1010
call random_seed(seed_put, seed_get)
1111

12-
! single standard exponential random variate
12+
! single standard exponential random variate
1313
print *, rexp()
1414
! 0.358690143
1515

16-
! exponential random variate with lambda=2
17-
print *, rexp(2.0)
18-
! 0.204114929
19-
2016
! exponential random variate with loc=0 and scale=0.5 (lambda=2)
2117
print *, rexp(0.0, 0.5)
2218
! 0.122672431
2319

20+
! exponential random variate with lambda=2
21+
print *, rexp(2.0)
22+
! 0.204114929
23+
2424
! exponential random variate with loc=0.6 and scale=0.2 (lambda=5)
2525
print *, rexp(0.6, 0.2)
2626
! 0.681645989

0 commit comments

Comments
 (0)