Skip to content

Commit 2b5028c

Browse files
committed
Fix special cases and move note
1 parent cb2c8df commit 2b5028c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

spec/API_specification/array_api/elementwise_functions.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -533,28 +533,28 @@ def exp(x: array, /) -> array:
533533
534534
For complex floating-point operands, let ``a = real(x_i)``, ``b = imag(x_i)``, and
535535
536-
- If ``a`` is either ``+0`` or ``-0`` and ``b`` is either ``+0`` or ``-0``, the result is ``1+0j``.
536+
.. note::
537+
For complex floating-point operands, ``exp(conj(x))`` must equal ``conj(exp(x))``.
538+
539+
- If ``a`` is either ``+0`` or ``-0`` and ``b`` is ``+0``, the result is ``1+0j``.
537540
- If ``a`` is a finite number and ``b`` is ``+infinity``, the result is ``NaN + NaN j``.
538541
- If ``a`` is a finite number and ``b`` is ``NaN``, the result is ``NaN + NaN j``.
539-
- If ``a`` is ``+infinity`` and ``b`` is either ``+0`` or ``-0``, the result is ``infinity + 0j``.
542+
- If ``a`` is ``+infinity`` and ``b`` is ``+0``, the result is ``infinity + 0j``.
540543
- If ``a`` is ``-infinity`` and ``b`` is a finite number, the result is ``+0 * cis(x_i)``.
541544
- If ``a`` is ``+infinity`` and ``b`` is a nonzero finite number, the result is ``+infinity * cis(x_i)``.
542545
- If ``a`` is ``-infinity`` and ``b`` is ``+infinity``, the result is ``0 + 0j`` (signs of real and imaginary components are unspecified).
543546
- If ``a`` is ``+infinity`` and ``b`` is ``+infinity``, the result is ``infinity + NaN j`` (sign of real component is unspecified).
544547
- If ``a`` is ``-infinity`` and ``b`` is ``NaN``, the result is ``0 + 0j`` (signs of real and imaginary components are unspecified).
545548
- If ``a`` is ``+infinity`` and ``b`` is ``NaN``, the result is ``infinity + NaN j`` (sign of real component is unspecified).
546-
- If ``a`` is ``NaN`` and ``b`` is either ``+0`` or ``-0``, the result is ``NaN + 0j``.
549+
- If ``a`` is ``NaN`` and ``b`` is ``+0``, the result is ``NaN + 0j``.
547550
- If ``a`` is ``NaN`` and ``b`` is not equal to ``0``, the result is ``NaN + NaN j``.
548551
- If ``a`` is ``NaN`` and ``b`` is ``NaN``, the result is ``NaN + NaN j``.
549552
550-
where ``cis(x_i)`` is ``cos(x_i) + sin(x_i)*1j``.
553+
where ``cis(v)`` is ``cos(v) + sin(v)*1j``.
551554
552555
.. note::
553556
The exponential function is an entire function in the complex plane and has no branch cuts.
554557
555-
.. note::
556-
For complex floating-point operands, ``exp(conj(x))`` must equal ``conj(exp(x))``.
557-
558558
Parameters
559559
----------
560560
x: array

0 commit comments

Comments
 (0)