Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
) (#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 a2d54d4) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
- Loading branch information
1 parent
6968f9e
commit c594e25
Showing
3 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
Misc/NEWS.d/next/Library/2023-07-11-09-25-40.gh-issue-106530.VgXrMx.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |