Skip to content

Commit 294301d

Browse files
committed
Special case NaNs in min/max inputs
1 parent 4c041ea commit 294301d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

spec/API_specification/statistical_functions.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ Calculates the maximum value of the input array `x`.
2424
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`).
2525
```
2626

27+
#### Special Cases
28+
29+
- if `NaN` in elements over which to compute the maximum value, the result is `NaN`.
30+
2731
#### Parameters
2832

2933
- **x**: _<array>_
@@ -88,6 +92,10 @@ Calculates the minimum value of the input array `x`.
8892
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`).
8993
```
9094

95+
#### Special Cases
96+
97+
- if `NaN` in elements over which to compute the minimum value, the result is `NaN`.
98+
9199
#### Parameters
92100

93101
- **x**: _<array>_

0 commit comments

Comments
 (0)