Skip to content

Commit cb2c8df

Browse files
committed
Specify special case in terms of cis function
1 parent f84e176 commit cb2c8df

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spec/API_specification/array_api/elementwise_functions.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,8 +537,8 @@ def exp(x: array, /) -> array:
537537
- If ``a`` is a finite number and ``b`` is ``+infinity``, the result is ``NaN + NaN j``.
538538
- If ``a`` is a finite number and ``b`` is ``NaN``, the result is ``NaN + NaN j``.
539539
- If ``a`` is ``+infinity`` and ``b`` is either ``+0`` or ``-0``, the result is ``infinity + 0j``.
540-
- If ``a`` is ``-infinity`` and ``b`` is a finite number, the result is ``0 + 0j``.
541-
- If ``a`` is ``+infinity`` and ``b`` is a nonzero finite number, the result is ``infinity + infinity j``.
540+
- If ``a`` is ``-infinity`` and ``b`` is a finite number, the result is ``+0 * cis(x_i)``.
541+
- If ``a`` is ``+infinity`` and ``b`` is a nonzero finite number, the result is ``+infinity * cis(x_i)``.
542542
- If ``a`` is ``-infinity`` and ``b`` is ``+infinity``, the result is ``0 + 0j`` (signs of real and imaginary components are unspecified).
543543
- If ``a`` is ``+infinity`` and ``b`` is ``+infinity``, the result is ``infinity + NaN j`` (sign of real component is unspecified).
544544
- If ``a`` is ``-infinity`` and ``b`` is ``NaN``, the result is ``0 + 0j`` (signs of real and imaginary components are unspecified).
@@ -547,6 +547,8 @@ def exp(x: array, /) -> array:
547547
- If ``a`` is ``NaN`` and ``b`` is not equal to ``0``, the result is ``NaN + NaN j``.
548548
- If ``a`` is ``NaN`` and ``b`` is ``NaN``, the result is ``NaN + NaN j``.
549549
550+
where ``cis(x_i)`` is ``cos(x_i) + sin(x_i)*1j``.
551+
550552
.. note::
551553
The exponential function is an entire function in the complex plane and has no branch cuts.
552554

0 commit comments

Comments
 (0)