Skip to content

gh-156886: Fix spurious ZeroDivisionError for complex powers - #156887

Merged
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:complex-pow-edom
Sep 4, 2026
Merged

gh-156886: Fix spurious ZeroDivisionError for complex powers#156887
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:complex-pow-edom

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Sep 3, 2026

Copy link
Copy Markdown
Member

cos() and sin() of an infinite phase set errno to EDOM, which complex_pow() reported as a zero base.

🤖 Generated with Claude Code

cos() and sin() of an infinite phase set errno to EDOM, which
complex_pow() reported as a zero base.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@serhiy-storchaka

Copy link
Copy Markdown
Member Author

Not sure that this is the best solution, but it is the simplest.

@skirpichev skirpichev added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Sep 3, 2026
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @skirpichev for commit 08cc039 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F156887%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Sep 3, 2026

@skirpichev skirpichev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, one minor comment.

Comment thread Objects/complexobject.c Outdated
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) September 4, 2026 07:35
@serhiy-storchaka
serhiy-storchaka merged commit 5f7d709 into python:main Sep 4, 2026
53 of 54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants