You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As noted in issue #106498, the TODO comment and this patch were incorrect in that 2.0 - maxc - minc does not equal 2.0 - (maxc + minc) for maxc, minc = 1.0, 0.9999999999999999 because the float sum is 2.0, leaving 0.0 and causing ZeroDivisionError, whereas the correct subtraction leaves 1.1102230246251565e-16.
Activity
jjerphan commentedon Nov 24, 2020
This issue has been created after the PR.
terryjreedy commentedon Nov 28, 2020
New changeset f919531 by Julien Jerphanion in branch 'master':
bpo-42452: Improve colorsys.rgb_to_hls code (GH-23306)
f919531
terryjreedy commentedon Nov 28, 2020
The change was a suggested TODO in the code itself.
[-]FIX Optimize 'rgb_to_hls'[/-][+]Improve colorsys.rgb_to_hls code[/+][-]FIX Optimize 'rgb_to_hls'[/-][+]Improve colorsys.rgb_to_hls code[/+]terryjreedy commentedon Jul 11, 2023
As noted in issue #106498, the TODO comment and this patch were incorrect in that
2.0 - maxc - mincdoes not equal2.0 - (maxc + minc)formaxc, minc = 1.0, 0.9999999999999999because the float sum is 2.0, leaving 0.0 and causing ZeroDivisionError, whereas the correct subtraction leaves1.1102230246251565e-16.pythongh-106498: Revert incorrect colorsys.rgb_to_hls change
gh-106498: Revert incorrect colorsys.rgb_to_hls change (#106627)
pythongh-106498: Revert incorrect colorsys.rgb_to_hls change (pythonG…
pythongh-106498: Revert incorrect colorsys.rgb_to_hls change (pythonG…
[3.12] gh-106498: Revert incorrect colorsys.rgb_to_hls change (GH-106627
[3.11] gh-106498: Revert incorrect colorsys.rgb_to_hls change (GH-106627