Skip to content

gh-112019: Add Py_complex_abs() function - #112107

Closed
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:py_complex
Closed

vstinner wants to merge 1 commit into
python:mainfrom
vstinner:py_complex

Conversation

@vstinner

@vstinner vstinner commented Nov 15, 2023 •

Copy link
Copy Markdown
Member

Add functions operating on Py_complex numbers:

  • Py_complex_sum()
  • Py_complex_diff()
  • Py_complex_neg()
  • Py_complex_prod()
  • Py_complex_quot()
  • Py_complex_pow()
  • Py_complex_abs()

Add basic tests on these functions in test_capi.


📚 Documentation preview 📚: https://cpython-previews--112107.org.readthedocs.build/

Add functions operating on Py_complex numbers:

* Py_complex_sum()
* Py_complex_diff()
* Py_complex_neg()
* Py_complex_prod()
* Py_complex_quot()
* Py_complex_pow()
* Py_complex_abs()

Add basic tests on these functions in test_capi.
@vstinner

Copy link
Copy Markdown
Member Author
@vstinner

Copy link
Copy Markdown
Member Author

Only the numba is known to call _Py_c_pow(). Apparently, _Py_c functions are not used in the wild apart of the numba case. For now, I mark this PR as a draft.

@vstinner
vstinner marked this pull request as draft November 15, 2023 05:18
@vstinner

Copy link
Copy Markdown
Member Author

I'm no longer convinced that we should make these APIs public. See #112019 discussion. I close this PR.

@vstinner vstinner closed this Nov 15, 2023
@vstinner
vstinner deleted the py_complex branch January 14, 2025 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant