8000 Add complex number support to `expm1` by kgryte · Pull Request #452 · data-apis/array-api · GitHub
[go: up one dir, main page]

Skip to content

Add complex number support to expm1 #452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 17, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Move note
  • Loading branch information
kgryte committed Nov 17, 2022
commit 2d87088e2897ec7aef281ba35ce3e61be9af1977
6 changes: 3 additions & 3 deletions spec/API_specification/array_api/elementwise_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,9 +659,6 @@ def expm1(x: array, /) -> array:

For complex floating-point operands, let ``a = real(x_i)``, ``b = imag(x_i)``, and

.. note::
For complex floating-point operands, ``expm1(conj(x))`` must equal ``conj(expm1(x))``.

- If ``a`` is either ``+0`` or ``-0`` and ``b`` is ``+0``, the result is ``0 + 0j``.
- If ``a`` is a finite number and ``b`` is ``+infinity``, the result is ``NaN + NaN j``.
- If ``a`` is a finite number and ``b`` is ``NaN``, the result is ``NaN + NaN j``.
Expand All @@ -678,6 +675,9 @@ def expm1(x: array, /) -> array:

where ``cis(v)`` is ``cos(v) + sin(v)*1j``.

.. note::
For complex floating-point operands, ``expm1(conj(x))`` must equal ``conj(expm1(x))``.

.. note::
The exponential function is an entire function in the complex plane and has no branch cuts.

Expand Down
0