Skip to content

Commit fa4758f

Browse files
committed
specify that sigma must be positive, otherwise result is NaN
1 parent 9adb14e commit fa4758f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/specs/stdlib_stats_distribution_normal.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Experimental
1414

1515
### Description
1616

17-
A normal continuous random variate distribution, also known as Gaussian, or Gauss or Laplace-Gauss distribution. The location `loc` specifies the mean or expectation ($\mu$). The `scale` specifies the standard deviation ($\sigma$).
17+
A normal continuous random variate distribution, also known as Gaussian, or Gauss or Laplace-Gauss distribution. The location `loc` specifies the mean or expectation ($\mu$). The `scale` specifies the standard deviation ($\sigma$).
1818

1919
Without argument, the function returns a standard normal distributed random variate $N(0,1)$.
2020

@@ -82,13 +82,13 @@ Elemental function
8282

8383
`loc`: has `intent(in)` and is a scalar of type `real` or `complex`.
8484

85-
`scale`: has `intent(in)` and is a scalar of type `real` or `complex`.
85+
`scale`: has `intent(in)` and is a positive scalar of type `real` or `complex`.
8686

8787
All three arguments must have the same type.
8888

8989
### Return value
9090

91-
The result is a scalar or an array, with a shape conformable to the arguments, and of the same type as the input arguments.
91+
The result is a scalar or an array, with a shape conformable to the arguments, and of the same type as the input arguments. If `scale` is non-positive, the result is `NaN`.
9292

9393
### Example
9494

@@ -128,13 +128,13 @@ Elemental function
128128

129129
`loc`: has `intent(in)` and is a scalar of type `real` or `complex`.
130130

131-
`scale`: has `intent(in)` and is a scalar of type `real` or `complex`.
131+
`scale`: has `intent(in)` and is a positive scalar of type `real` or `complex`.
132132

133133
All three arguments must have the same type.
134134

135135
### Return value
136136

137-
The result is a scalar or an array, with a shape conformable to arguments, as the same type of input arguments.
137+
The result is a scalar or an array, with a shape conformable to arguments, as the same type of input arguments. If `scale` is non-positive, the result is `NaN`.
138138

139139
### Example
140140

0 commit comments

Comments
 (0)