Generating equally-spaced floats with least rounding error

Chris Angelico rosuav at gmail.com
Sat Sep 24 13:03:14 EDT 2011


On Sun, Sep 25, 2011 at 12:26 AM, Mel <mwilson at the-wire.com> wrote:
> low_limit + (total_width * i) / intervals
>

Definite improvement, if the range is comparatively small. Multiply
first, then divide.

ChrisA



More information about the Python-list mailing list