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-144173: fix flaky test_complex.test_truediv()#144355

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

Open
skirpichev wants to merge1 commit intopython:main
base:main
Choose a base branch
Loading
fromskirpichev:fix-flaky-complex-test_truediv/144173

Conversation

@skirpichev
Copy link
Member

@skirpichevskirpichev commentedJan 31, 2026
edited by bedevere-appbot
Loading

Previously, component-wise relative error bound was tested. However, such bound can't exist already for complex multiplication as one can be used to perform subtraction of floating-point numbers, e.g. x and y for z0=1+1j and z1=x+yj.

>>> x, y=1e-9+1j,1+1j>>> a= x*y*y.conjugate()/2;a(1.0000000272292198e-09+1j)>>> b= x*(y*y.conjugate()/2);b(1e-09+1j)>>> b== xTrue>>> (a.real-b.real)/math.ulp(b.real)131672427.0

Previously, component-wise relative error bound was tested.  However,such bound can't exist already for complex multiplication as one can beused to perform subtraction of floating-point numbers, e.g. x and y forz0=1+1j and z1=x+yj.```pycon>>> x, y = 1e-9+1j, 1+1j>>> a = x*y*y.conjugate()/2;a(1.0000000272292198e-09+1j)>>> b = x*(y*y.conjugate()/2);b(1e-09+1j)>>> b == xTrue>>> (a.real-b.real)/math.ulp(b.real)131672427.0```
@bedevere-appbedevere-appbot added the testsTests in the Lib/test dir labelJan 31, 2026
@skirpichev
Copy link
MemberAuthor

CC@tim-one

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tim-onetim-oneAwaiting requested review from tim-one

Assignees

No one assigned

Labels

awaiting reviewskip newstestsTests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@skirpichev

[8]ページ先頭

©2009-2026 Movatter.jp