Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions spec/API_specification/elementwise_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,37 @@ For floating-point operands,

- 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`.

(function-logaddexp)=
### logaddexp(x1, x2)

Calculates the logarithm of the sum of exponentiations `log(exp(x1) + exp(x2))` for
each element `x1_i` of the input array `x1` with the respective element `x2_i` of the input array
`x2`.

#### Special Cases

For floating-point operands,

- If `x1_i` or `x2_i` is `NaN`, the result is `NaN`.
- If `x1_i` or `x2_i` is `+infinity`, the result is `+infinity`.

#### Parameters

- **x1**: _<array>_

- first input array.

- **x2**: _<array>_

- second input array. Must be compatible with `x1` (see {ref}`broadcasting`).

#### Returns

- **out**: _<array>_

- an array containing the element-wise results. The returned array must have a floating-point
data type determined by {ref}`type-promotion`.

(function-logical_and)=
### logical_and(x1, x2, /)

Expand Down