You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec/API_specification/statistical_functions.md
+33Lines changed: 33 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,12 @@ Calculates the maximum value of the input array `x`.
24
24
When the number of elements over which to compute the maximum value is zero, the maximum value is implementation-defined. Specification-compliant libraries may choose to error, return a sentinel value (e.g., if `x` is a floating-point input array, return `NaN`), or return the minimum possible value for the input array `x` data type (e.g., if `x` is a floating-point array, return `-infinity`).
25
25
```
26
26
27
+
#### Special Cases
28
+
29
+
Let `x_i` be an element over which to compute the maximum value. For floating-point operands,
30
+
31
+
- if `x_i` is `NaN`, the maximum value is `NaN` (i.e., `NaN` values propagate).
32
+
27
33
#### Parameters
28
34
29
35
-**x**: _<array>_
@@ -55,6 +61,11 @@ For a floating-point input array `x`, let `N` equal the number of elements over
55
61
56
62
- if `N` is `0`, the arithmetic mean is `NaN`.
57
63
64
+
Let `x_i` be an element over which to compute the arithmetic mean. For floating-point operands,
65
+
66
+
- if `x_i` is `NaN`, the arithmetic mean is `NaN` (i.e., `NaN` values propagate).
67
+
68
+
58
69
#### Parameters
59
70
60
71
-**x**: _<array>_
@@ -88,6 +99,12 @@ Calculates the minimum value of the input array `x`.
88
99
When the number of elements over which to compute the minimum value is zero, the minimum value is implementation-defined. Specification-compliant libraries may choose to error, return a sentinel value (e.g., if `x` is a floating-point input array, return `NaN`), or return the maximum possible value for the input array `x` data type (e.g., if `x` is a floating-point array, return `+infinity`).
89
100
```
90
101
102
+
#### Special Cases
103
+
104
+
Let `x_i` be an element over which to compute the minimum value. For floating-point operands,
105
+
106
+
- if `x_i` is `NaN`, the minimum value is `NaN` (i.e., `NaN` values propagate).
107
+
91
108
#### Parameters
92
109
93
110
-**x**: _<array>_
@@ -119,6 +136,10 @@ For an input array `x`, let `N` equal the number of elements over which to compu
119
136
120
137
- if `N` is `0`, the product is `1` (i.e., the empty product).
121
138
139
+
Let `x_i` be an element over which to compute the product. For floating-point operands,
140
+
141
+
- if `x_i` is `NaN`, the product is `NaN` (i.e., `NaN` values propagate).
142
+
122
143
#### Parameters
123
144
124
145
-**x**: _<array>_
@@ -163,6 +184,10 @@ For a floating-point input array `x`, let `N` equal the number of elements over
163
184
164
185
- if `N - correction` is less than or equal to `0`, the standard deviation is `NaN`.
165
186
187
+
Let `x_i` be an element over which to compute the standard deviation. For floating-point operands,
188
+
189
+
- if `x_i` is `NaN`, the standard deviation is `NaN` (i.e., `NaN` values propagate).
190
+
166
191
#### Parameters
167
192
168
193
- **x**: _<array>_
@@ -202,6 +227,10 @@ For an input array `x`, let `N` equal the number of elements over which to compu
202
227
203
228
- if `N` is `0`, the sum is `0` (i.e., the empty sum).
204
229
230
+
Let `x_i` be an element over which to compute the sum. For floating-point operands,
231
+
232
+
- if `x_i` is `NaN`, the sum is `NaN` (i.e., `NaN` values propagate).
233
+
205
234
#### Parameters
206
235
207
236
- **x**: _<array>_
@@ -246,6 +275,10 @@ For a floating-point input array `x`, let `N` equal the number of elements over
246
275
247
276
- if `N - correction` is less than or equal to `0`, the variance is `NaN`.
248
277
278
+
Let `x_i` be an element over which to compute the variance. For floating-point operands,
279
+
280
+
- if `x_i` is `NaN`, the variance is `NaN` (i.e., `NaN` values propagate).
0 commit comments