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

gh-119771: adjust errno on overflows in _Py_c_pow()#120256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 3 commits intopython:mainfromskirpichev:complex_pow-errno-119771
Sep 18, 2024

Conversation

@skirpichev
Copy link
Contributor

@skirpichevskirpichev commentedJun 8, 2024
edited by github-actionsbot
Loading

Before we did this in complex_pow() and behaviour of the public C API function_Py_c_pow() was different from the pure-python pow().


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

Before we did this in complex_pow() and behaviour of the public C APIfunction ``_Py_c_pow()`` was different from the pure-python pow().
Co-authored-by: Victor Stinner <vstinner@python.org>
// a faster and more accurate algorithm.
if (b.imag==0.0&&b.real==floor(b.real)&&fabs(b.real) <=100.0) {
p=c_powi(a, (long)b.real);
_Py_ADJUST_ERANGE2(p.real,p.imag);
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

That might be moved toc_powi(), but that will make patch slightly larger. I think this is fine, asc_powi() is not a part of C API.

Copy link
Member

@vstinnervstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM

@skirpichev
Copy link
ContributorAuthor

@vstinner, do you want a second opinion on this?

Copy link
Member

@vstinnervstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM

@vstinnervstinner merged commit8a284e1 intopython:mainSep 18, 2024
@vstinner
Copy link
Member

Merged, thanks. I made minor edits on the commit message.

@skirpichevskirpichev deleted the complex_pow-errno-119771 branchSeptember 18, 2024 08:46
@zwarezware mentioned this pull requestSep 18, 2024
savannahostrowski pushed a commit to savannahostrowski/cpython that referenced this pull requestSep 22, 2024
Before we did this in complex_pow() and behavior of the public C APIfunction _Py_c_pow() was different from the pure-python pow().
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@vstinnervstinnervstinner approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@skirpichev@vstinner

[8]ページ先頭

©2009-2025 Movatter.jp