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
+31
Original file line number
Diff line number
Diff line change
@@ -927,6 +927,37 @@ For floating-point operands,
927
927
928
928
- an array containing the evaluated base `10` logarithm for each element in `x`. The returned array must have a floating-point data type determined by {ref}`type-promotion`.
929
929
930
+
(function-logaddexp)=
931
+
### logaddexp(x1, x2)
932
+
933
+
Calculates the logarithm of the sum of exponentiations `log(exp(x1) + exp(x2))` for
934
+
each element `x1_i` of the input array `x1` with the respective element `x2_i` of the input array
935
+
`x2`.
936
+
937
+
#### Special Cases
938
+
939
+
For floating-point operands,
940
+
941
+
- If `x1_i` or `x2_i` is `NaN`, the result is `NaN`.
942
+
- If `x1_i` or `x2_i` is `+infinity`, the result is `+infinity`.
943
+
944
+
#### Parameters
945
+
946
+
-**x1**: _<array>_
947
+
948
+
- first input array.
949
+
950
+
-**x2**: _<array>_
951
+
952
+
- second input array. Must be compatible with `x1` (see {ref}`broadcasting`).
953
+
954
+
#### Returns
955
+
956
+
-**out**: _<array>_
957
+
958
+
- an array containing the element-wise results. The returned array must have a floating-point
0 commit comments