diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-07-11 15:47:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-11 15:47:15 (GMT) |
commit | c594e25cd76b9d2be04eaebc13df2becbdda7aed (patch) | |
tree | 0461a23572192c8b5efc94e8a57ca9aa4bc20732 /Misc | |
parent | 6968f9e4d3593610b60c1140f04de275ff40cd41 (diff) | |
download | cpython-c594e25cd76b9d2be04eaebc13df2becbdda7aed.zip cpython-c594e25cd76b9d2be04eaebc13df2becbdda7aed.tar.gz cpython-c594e25cd76b9d2be04eaebc13df2becbdda7aed.tar.bz2 |
[3.12] gh-106498: Revert incorrect colorsys.rgb_to_hls change (GH-106627) (#106632)
gh-106498: Revert incorrect colorsys.rgb_to_hls change (GH-106627)
gh-86618 assumed a-b-c = a-(b+c) = a-d where d = b+d.
For floats 2.0, 1.0, and 0.9999999999999999, this assumption
is false. The net change of 1.1102230246251565e-16 to 0.0
results in division by 0. Revert the replacement. Add test.
(cherry picked from commit a2d54d4e8ab12f967a220be88bde8ac8227c5ab3)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2023-07-11-09-25-40.gh-issue-106530.VgXrMx.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2023-07-11-09-25-40.gh-issue-106530.VgXrMx.rst b/Misc/NEWS.d/next/Library/2023-07-11-09-25-40.gh-issue-106530.VgXrMx.rst new file mode 100644 index 0000000..09fc647 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-07-11-09-25-40.gh-issue-106530.VgXrMx.rst @@ -0,0 +1,2 @@ +Revert a change to :func:`colorsys.rgb_to_hls` that caused division by zero +for certain almost-white inputs. Patch by Terry Jan Reedy. |