cpython/Misc/NEWS.d/next/Library/2023-07-11-09-25-40.gh-issue-106530.VgXrMx.rst
Terry Jan Reedy a2d54d4e8a
gh-106498: Revert incorrect colorsys.rgb_to_hls change (#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.
2023-07-11 11:07:20 -04:00

2 lines
136 B
ReStructuredText

Revert a change to :func:`colorsys.rgb_to_hls` that caused division by zero
for certain almost-white inputs. Patch by Terry Jan Reedy.