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
Calculates an implementation-dependent approximation of the principal value of the inverse tangent, having domain ``[-infinity, +infinity]`` and codomain ``[-π/2, +π/2]``, for each element ``x_i`` of the input array ``x``. Each element-wise result is expressed in radians.
170
+
r"""
171
+
Calculates an implementation-dependent approximation of the principal value of the inverse tangent for each element ``x_i`` of the input array ``x``.
172
+
173
+
Each element-wise result is expressed in radians.
172
174
173
175
**Special cases**
174
176
175
-
For floating-point operands,
177
+
For real-valued floating-point operands,
176
178
177
179
- If ``x_i`` is ``NaN``, the result is ``NaN``.
178
180
- If ``x_i`` is ``+0``, the result is ``+0``.
179
181
- If ``x_i`` is ``-0``, the result is ``-0``.
180
182
- If ``x_i`` is ``+infinity``, the result is an implementation-dependent approximation to ``+π/2``.
181
183
- If ``x_i`` is ``-infinity``, the result is an implementation-dependent approximation to ``-π/2``.
182
184
185
+
For complex floating-point operands, special cases must be handled as if the operation is implemented as ``-1j * atanh(x*1j)``.
186
+
187
+
.. note::
188
+
The principal value of the inverse tangent of a complex number :math:`z` is
For complex floating-point operands, ``atan(conj(x))`` must equal ``conj(atan(x))``.
195
+
196
+
.. note::
197
+
The inverse tangent (or arc tangent) is a multi-valued function and requires a branch on the complex plane. By convention, a branch cut is placed at the line segments :math:`(-\infty j, -j)` and :math:`(+j, \infty j)` of the imaginary axis.
198
+
199
+
Accordingly, for complex arguments, the function returns the inverse tangent in the range of a strip unbounded along the imaginary axis and in the interval :math:`[-\pi/2, +\pi/2]` along the real axis.
200
+
201
+
*Note: branch cuts have provisional status* (see :ref:`branch-cuts`).
202
+
183
203
Parameters
184
204
----------
185
205
x: array
186
-
input array. Should have a real-valued floating-point data type.
206
+
input array. Should have a floating-point data type.
187
207
188
208
Returns
189
209
-------
190
210
out: array
191
-
an array containing the inverse tangent of each element in ``x``. The returned array must have a real-valued floating-point data type determined by :ref:`type-promotion`.
211
+
an array containing the inverse tangent of each element in ``x``. The returned array must have a floating-point data type determined by :ref:`type-promotion`.
0 commit comments