[issue26296] colorsys rgb_to_hls algorithm error

Serhiy Storchaka report at bugs.python.org
Sat Jan 14 09:52:12 EST 2017


Serhiy Storchaka added the comment:

> The modulus fixes it for exact numbers.  It doesn't produce exactly the same result with floats, because of rounding.  Is that a problem?

I don't think that is a problem. The function uses a number of floating point operations producing inexact intermediate values. There is not an evidence that the proposed code produces more accurate value.

----------
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage: needs patch -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26296>
_______________________________________


More information about the Python-bugs-list mailing list