diff --git a/spec/API_specification/elementwise_functions.md b/spec/API_specification/elementwise_functions.md index 35210d7b1..cd2a3903d 100644 --- a/spec/API_specification/elementwise_functions.md +++ b/spec/API_specification/elementwise_functions.md @@ -449,6 +449,14 @@ Rounds each element `x_i` of the input array `x` to the smallest (i.e., closest - If `x_i` is already integer-valued, the result is `x_i`. +For floating-point operands, + +- If `x_i` is `+infinity`, the result is `+infinity`. +- If `x_i` is `-infinity`, the result is `-infinity`. +- If `x_i` is `+0`, the result is `+0`. +- If `x_i` is `-0`, the result is `-0`. +- If `x_i` is `NaN`, the result is `NaN`. + #### Parameters - **x**: _<array>_ @@ -651,6 +659,14 @@ Rounds each element `x_i` of the input array `x` to the greatest (i.e., closest - If `x_i` is already integer-valued, the result is `x_i`. +For floating-point operands, + +- If `x_i` is `+infinity`, the result is `+infinity`. +- If `x_i` is `-infinity`, the result is `-infinity`. +- If `x_i` is `+0`, the result is `+0`. +- If `x_i` is `-0`, the result is `-0`. +- If `x_i` is `NaN`, the result is `NaN`. + #### Parameters - **x**: _<array>_ @@ -1237,6 +1253,14 @@ Rounds each element `x_i` of the input array `x` to the nearest integer-valued n #### Special Cases - If `x_i` is already integer-valued, the result is `x_i`. + +For floating-point operands, + +- If `x_i` is `+infinity`, the result is `+infinity`. +- If `x_i` is `-infinity`, the result is `-infinity`. +- If `x_i` is `+0`, the result is `+0`. +- If `x_i` is `-0`, the result is `-0`. +- If `x_i` is `NaN`, the result is `NaN`. - If two integers are equally close to `x_i`, the result is the even integer closest to `x_i`. #### Parameters @@ -1454,6 +1478,14 @@ Rounds each element `x_i` of the input array `x` to the integer-valued number th - If `x_i` is already integer-valued, the result is `x_i`. +For floating-point operands, + +- If `x_i` is `+infinity`, the result is `+infinity`. +- If `x_i` is `-infinity`, the result is `-infinity`. +- If `x_i` is `+0`, the result is `+0`. +- If `x_i` is `-0`, the result is `-0`. +- If `x_i` is `NaN`, the result is `NaN`. + #### Parameters - **x**: _<array>_