Skip to content

Commit 6e2fd8e

Browse files
committed
chore: update specs
1 parent c119735 commit 6e2fd8e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

doc/specs/stdlib_stats_distribution_normal.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,17 @@ With two arguments, the function returns a normal distributed random variate \(N
2323

2424
With three arguments, the function returns a rank-1 array of normal distributed random variates.
2525

26+
With two arguments `array_size` and `mold`, the function returns a rank-1 array of standard normal distributed random variates \(N(0,1)\), where the `mold` argument is used only to determine the output type and kind.
27+
2628
@note
2729
The algorithm used for generating exponential random variates is fundamentally limited to double precision.[^1]
2830

2931
### Syntax
3032

3133
`result = ` [[stdlib_stats_distribution_normal(module):rvs_normal(interface)]] `([loc, scale] [[, array_size]])`
3234

35+
`result = ` [[stdlib_stats_distribution_normal(module):rvs_normal(interface)]] `(array_size, mold)`
36+
3337
### Class
3438

3539
Elemental function (passing both `loc` and `scale`).
@@ -40,13 +44,15 @@ Elemental function (passing both `loc` and `scale`).
4044

4145
`scale`: optional argument has `intent(in)` and is a positive scalar of type `real` or `complex`.
4246

43-
`array_size`: optional argument has `intent(in)` and is a scalar of type `integer`.
47+
`array_size`: optional argument has `intent(in)` and is a scalar of type `integer`. When used with `loc` and `scale`, specifies the size of the output array. When used with `mold`, must be provided as the first argument.
48+
49+
`mold`: optional argument has `intent(in)` and is a scalar of type `real` or `complex`. Used only to determine the type and kind of the output; its value is not referenced. When provided, generates standard normal variates \(N(0,1)\).
4450

4551
`loc` and `scale` arguments must be of the same type.
4652

4753
### Return value
4854

49-
The result is a scalar or rank-1 array, with a size of `array_size`, and the same type as `scale` and `loc`. If `scale` is non-positive, the result is `NaN`.
55+
The result is a scalar or rank-1 array, with a size of `array_size`, and the same type as `scale` and `loc` (or same type and kind as `mold` when using the `array_size, mold` form). If `scale` is non-positive, the result is `NaN`.
5056

5157
### Example
5258

0 commit comments

Comments
 (0)