A use for integer quotients
Guido van Rossum
guido at python.org
Tue Jul 24 20:26:07 EDT 2001
"Fredrik Lundh" <fredrik at pythonware.com> writes:
> Guido van Rossum wrote:
> > But I also found a likely bug! In colorsys.py, there are two routines
> > (rgb_to_hls() and rgb_to_hsv()) that seem to be doing floating point
> > math using (r, g, b) inputs and don't take any consistent precaution
> > to cast these inputs to floats before dividing them.
>
> from the docstring:
>
> "All inputs and outputs are triples of floats in the range [0.0...1.0].
> Inputs outside this range may cause exceptions or invalid outputs."
>
> </F>
Whoops. :-(
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-list
mailing list