Return the sum of two complex numbers, using the C :c:type:`Py_complex`
representation.
+ .. deprecated:: 3.15
+ This function is :term:`soft deprecated`.
+
.. c:function:: Py_complex _Py_c_diff(Py_complex left, Py_complex right)
Return the difference between two complex numbers, using the C
:c:type:`Py_complex` representation.
+ .. deprecated:: 3.15
+ This function is :term:`soft deprecated`.
+
.. c:function:: Py_complex _Py_c_neg(Py_complex num)
Return the negation of the complex number *num*, using the C
:c:type:`Py_complex` representation.
+ .. deprecated:: 3.15
+ This function is :term:`soft deprecated`.
+
.. c:function:: Py_complex _Py_c_prod(Py_complex left, Py_complex right)
Return the product of two complex numbers, using the C :c:type:`Py_complex`
representation.
+ .. deprecated:: 3.15
+ This function is :term:`soft deprecated`.
+
.. c:function:: Py_complex _Py_c_quot(Py_complex dividend, Py_complex divisor)
If *divisor* is null, this method returns zero and sets
:c:data:`errno` to :c:macro:`!EDOM`.
+ .. deprecated:: 3.15
+ This function is :term:`soft deprecated`.
+
.. c:function:: Py_complex _Py_c_pow(Py_complex num, Py_complex exp)
Set :c:data:`errno` to :c:macro:`!ERANGE` on overflows.
+ .. deprecated:: 3.15
+ This function is :term:`soft deprecated`.
+
+
+.. c:function:: double _Py_c_abs(Py_complex num)
+
+ Return the absolute value of the complex number *num*.
+
+ Set :c:data:`errno` to :c:macro:`!ERANGE` on overflows.
+
+ .. deprecated:: 3.15
+ This function is :term:`soft deprecated`.
+
Complex Numbers as Python Objects
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
signed integer type of the same size is now deprecated.
(Contributed by Serhiy Storchaka in :gh:`132629`.)
+* Functions :c:func:`_Py_c_sum`, :c:func:`_Py_c_diff`, :c:func:`_Py_c_neg`,
+ :c:func:`_Py_c_prod`, :c:func:`_Py_c_quot`, :c:func:`_Py_c_pow` and
+ :c:func:`_Py_c_abs` are :term:`soft deprecated`.
+ (Contributed by Sergey B Kirpichev in :gh:`128813`.)
+
.. Add C API deprecations above alphabetically, not here at the end.
Removed C APIs
double imag;
} Py_complex;
-// Operations on complex numbers.
+/* Operations on complex numbers (soft deprecated
+ since Python 3.15). */
PyAPI_FUNC(Py_complex) _Py_c_sum(Py_complex, Py_complex);
PyAPI_FUNC(Py_complex) _Py_c_diff(Py_complex, Py_complex);
PyAPI_FUNC(Py_complex) _Py_c_neg(Py_complex);
--- /dev/null
+Functions :c:func:`_Py_c_sum`, :c:func:`_Py_c_diff`, :c:func:`_Py_c_neg`,
+:c:func:`_Py_c_prod`, :c:func:`_Py_c_quot`, :c:func:`_Py_c_pow` and
+previously undocumented :c:func:`_Py_c_abs` are :term:`soft deprecated`.
+Patch by Sergey B Kirpichev.