Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Make _Py_c_sum(), _Py_c_diff(), etc (elementary operations on Py_complex) - part of the public API #128813

Open
Labels
@skirpichev

Description

@skirpichev

Proposal:

Suggested by@vstinner in#124829 (comment).

I would agree, as these routines could be useful (and it seems, they are used by few projects) to implement mathematical functions just like in the cmath module. No alternatives exist.

It's also suggested to use a different convention for arguments: currently we pass them by value. We could use pointers to Py_complex struct instead. (Though my quick tests shows no measurable difference.)

Also, we should decide on naming. For_Py_c_sum() -PyComplex_Add() was suggested. But this looks misleading, asPyComplex_ is a prefix for functions, operating withPyObject* arguments. Perhaps, rather we could instead usePy_complex_add() andPy_complex_add_real() (in the GNU GSL style). Current semi-private functions should be deprecated.

Previous discussions:

Other:

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp