Skip to content

bpo-38992: avoid fsum test failure from constant-folding#17513

Merged
mdickinson merged 2 commits into
python:masterfrom
mdickinson:fix/fsum-constant-folding-test-failure
Dec 9, 2019
Merged

bpo-38992: avoid fsum test failure from constant-folding#17513
mdickinson merged 2 commits into
python:masterfrom
mdickinson:fix/fsum-constant-folding-test-failure

Conversation

@mdickinson

@mdickinson mdickinson commented Dec 8, 2019

Copy link
Copy Markdown
Member

This is a tentative fix for the issue described at https://bugs.python.org/issue38992. One of the tests
for math.fsum was failing on a cross-compiled Python, due to two different values of a constant (1.7**1000) being used.

The change in this PR ensures that each power of 1.7 used in the fsum test is only computed once, so that there's no danger of using two different values of 1.7**1000.

https://bugs.python.org/issue38992

@mdickinson mdickinson merged commit bba873e into python:master Dec 9, 2019
@mdickinson mdickinson deleted the fix/fsum-constant-folding-test-failure branch December 9, 2019 14:36
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @mdickinson for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 9, 2019
)

* Issue 38992: avoid fsum test failure

* Add NEWS entry
(cherry picked from commit bba873e)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
@bedevere-bot

Copy link
Copy Markdown

GH-17530 is a backport of this pull request to the 3.8 branch.

mdickinson added a commit that referenced this pull request Dec 9, 2019
…H-17530)

* Issue 38992: avoid fsum test failure

* Add NEWS entry
(cherry picked from commit bba873e)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
)

* Issue 38992: avoid fsum test failure

* Add NEWS entry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants