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/elementwise_functions.md
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -128,7 +128,6 @@ For floating-point operands,
128
128
- In the remaining cases, when neither `infinity`, `+0`, `-0`, nor a `NaN` is involved, and the operands have the same mathematical sign or have different magnitudes, the sum must be computed and rounded to the nearest representable value according to IEEE 754-2019 and a supported round mode. If the magnitude is too large to represent, the operation overflows and the result is an `infinity` of appropriate mathematical sign.
129
129
130
130
```{note}
131
-
132
131
Floating-point addition is a commutative operation, but not always associative.
133
132
```
134
133
@@ -237,7 +236,6 @@ Calculates an implementation-dependent approximation of the inverse tangent of t
237
236
The mathematical signs of `x1_i` and `x2_i` determine the quadrant of each element-wise result. The quadrant (i.e., branch) is chosen such that each element-wise result is the signed angle in radians between the ray ending at the origin and passing through the point `(1,0)` and the ray ending at the origin and passing through the point `(x2_i, x1_i)`.
238
237
239
238
```{note}
240
-
241
239
Note the role reversal: the "y-coordinate" is the first function parameter; the "x-coordinate" is the second function parameter. The parameter order is intentional and traditional for the two-argument inverse tangent function where the y-coordinate argument is first and the x-coordinate argument is second.
242
240
```
243
241
@@ -402,7 +400,6 @@ Computes the bitwise OR of the underlying binary representation of each element
402
400
Shifts the bits of each element `x1_i` of the input array `x1` to the right according to the respective element `x2_i` of the input array `x2`.
403
401
404
402
```{note}
405
-
406
403
This operation must be an arithmetic shift (i.e., sign-propagating) and thus equivalent to floor division by a power of two.
407
404
```
408
405
@@ -620,7 +617,6 @@ For floating-point operands,
620
617
Calculates an implementation-dependent approximation to `exp(x)-1`, having domain `[-infinity, +infinity]` and codomain `[-1, +infinity]`, for each element `x_i` of the input array `x`.
621
618
622
619
```{note}
623
-
624
620
The purpose of this function is to calculate `exp(x)-1.0` more accurately when `x` is close to zero. Accordingly, conforming implementations should avoid implementing this function as simply `exp(x)-1.0`. See FDLIBM, or some other IEEE 754-2019 compliant mathematical library, for a potential reference implementation.
625
621
```
626
622
@@ -856,7 +852,6 @@ For floating-point operands,
856
852
Calculates an implementation-dependent approximation to `log(1+x)`, where `log` refers to the natural (base `e`) logarithm, having domain `[-1, +infinity]` and codomain `[-infinity, +infinity]`, for each element `x_i` of the input array `x`.
857
853
858
854
```{note}
859
-
860
855
The purpose of this function is to calculate `log(1+x)` more accurately when `x` is close to zero. Accordingly, conforming implementations should avoid implementing this function as simply `log(1+x)`. See FDLIBM, or some other IEEE 754-2019 compliant mathematical library, for a potential reference implementation.
861
856
```
862
857
@@ -1085,7 +1080,6 @@ For floating-point operands,
1085
1080
- In the remaining cases, where neither `infinity` nor `NaN` is involved, the product must be computed and rounded to the nearest representable value according to IEEE 754-2019 and a supported rounding mode. If the magnitude is too large to represent, the result is an `infinity` of appropriate mathematical sign. If the magnitude is too small to represent, the result is a zero of appropriate mathematical sign.
1086
1081
1087
1082
```{note}
1088
-
1089
1083
Floating-point multiplication is not always associative due to finite precision.
1090
1084
```
1091
1085
@@ -1110,6 +1104,10 @@ Floating-point multiplication is not always associative due to finite precision.
1110
1104
1111
1105
Computes the numerical negative of each element `x_i` (i.e., `y_i = -x_i`) of the input array `x`.
1112
1106
1107
+
```{note}
1108
+
For signed integer data types, the numerical negative of the minimum representable integer is implementation-dependent.
0 commit comments