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-132876: workaround broken ldexp() on Windows 10#133135

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
tim-one merged 10 commits intopython:mainfromskirpichev:fix-ldexp-MS/132876
May 26, 2025

Conversation

skirpichev
Copy link
Contributor

@skirpichevskirpichev commentedApr 29, 2025
edited
Loading

ldexp() on Windows doesn't round subnormal results before Windows 11, but should. Python's :func:math.ldexp wrapper now does round them.

Co-authored-by: Tim Peters <tim.peters@gmail.com>
@skirpichev
Copy link
ContributorAuthor

Some benchmarking in:#132876 (comment)

Copy link
Member

@tim-onetim-one left a comment

Choose a reason for hiding this comment

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

Since this is a potentially breaking change on Windows, it really needs a NEWS entry, yes? Like

math.ldexp() on Windows failed to round subnormal results before Window 11, and Microsoft probably won't fix it for Windows 10. So Python works around the error on Windows now. This may change results (which were formerly erroneous) in rare cases.

And maybe link to the issue report?

@zooba
Copy link
Member

It has a NEWS entry, though it could include a bit more detail (such as the ranges of values that may be incorrect). And that entry will already be linked to the bug. So this change LGTM

tim-one reacted with thumbs up emoji

@skirpichevskirpichev requested a review fromzoobaApril 30, 2025 07:27
@skirpichevskirpichev added the needs backport to 3.14bugs and security fixes labelMay 7, 2025
@skirpichevskirpichev requested a review frompicnixzMay 25, 2025 09:46
Copy link
Member

@picnixzpicnixz left a comment

Choose a reason for hiding this comment

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

Do you want to add a Windows 10-only test maybe? I don't know how easy it would be to detect that we're on W10.

@skirpichev
Copy link
ContributorAuthor

@picnixz, I just added test unconditionally (though, require IEEE 754).

tim-one reacted with thumbs up emoji

@tim-one
Copy link
Member

@skirpichev, do you need someone else to merge this? I believe all comments have been addressed.

@skirpichev
Copy link
ContributorAuthor

do you need someone else to merge this?

Yeah, someone with commit bit :-)

@tim-one
Copy link
Member

Ah - I didn't realize you don't have that! I'll do it now 😄 ,

@tim-onetim-one merged commitcf8941c intopython:mainMay 26, 2025
39 checks passed
@miss-islington-app
Copy link

Thanks@skirpichev for the PR, and@tim-one for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 26, 2025
…3135)*pythongh-132876: workaround broken ldexp() on Windows 10ldexp() fails to round subnormal results before Windows 11,so hide their bug.(cherry picked from commitcf8941c)Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>Co-authored-by: Tim Peters <tim.peters@gmail.com>
@miss-islington-app
Copy link

Sorry,@skirpichev and@tim-one, I could not cleanly backport this to3.13 due to a conflict.
Please backport usingcherry_picker on command line.

cherry_picker cf8941c60356acdd00055e5583a2d64761c34af4 3.13

@bedevere-app
Copy link

GH-134684 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelMay 26, 2025
@tim-one
Copy link
Member

FYI, I'm ignoring the auto-generated backport messages. Partly because I don't understand how that works 😦 .

@skirpichevskirpichev deleted the fix-ldexp-MS/132876 branchMay 26, 2025 02:59
@skirpichev
Copy link
ContributorAuthor

skirpichev commentedMay 26, 2025
edited
Loading

The witch failed to do her job. I'll prepare manual backport for 3.13.

tim-one reacted with thumbs up emoji

@bedevere-app
Copy link

GH-134685 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelMay 26, 2025
tim-one added a commit that referenced this pull requestMay 26, 2025
…#134684)gh-132876: workaround broken ldexp() on Windows 10 (GH-133135)*gh-132876: workaround broken ldexp() on Windows 10ldexp() fails to round subnormal results before Windows 11,so hide their bug.(cherry picked from commitcf8941c)Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>Co-authored-by: Tim Peters <tim.peters@gmail.com>
tim-one added a commit that referenced this pull requestMay 26, 2025
…#134685)*gh-132876: workaround broken ldexp() on Windows 10ldexp() fails to round subnormal results before Windows 11,so hide their bug.(cherry picked from commitcf8941c)Co-authored-by: Tim Peters <tim.peters@gmail.com>
@picnixz
Copy link
Member

Thanks for merging this Tim! FYI, I never merge something after 8 PM or when I'm not on Linux, just to be sure I can quickly revert if I made a mistake.

tim-one reacted with thumbs up emoji

@tim-one
Copy link
Member

FYI, I'm retired and "8pm" doesn't mean much of anything to me 😉. If I had to stay awake for another 12 hours to repair problems, that would have been OK. This PR was ready to merge for weeks already, passed exhaustive reviews by multiple capable reviewers, and is a straightforward, localized change. While a chance of unforeseen disaster is never absent, it looked as safe as a PR gets 😄

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

@zoobazoobazooba approved these changes

@picnixzpicnixzpicnixz approved these changes

@tim-onetim-onetim-one approved these changes

Assignees

@tim-onetim-one

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@skirpichev@zooba@tim-one@picnixz

[8]ページ先頭

©2009-2025 Movatter.jp