[issue22134] string formatting float rounding errors

2014-08-04 Thread Ned Deily
Ned Deily added the comment: What you are seeing is due to the limitations of binary floating-point arithmetic. The issue is described in more detail in the Python tutorial: https://docs.python.org/2/tutorial/floatingpoint.html#tut-fp-issues -- nosy: +ned.deily resolution: -> not a b

[issue22134] string formatting float rounding errors

2014-08-04 Thread Larry
New submission from Larry: Certain values close to the rounding boundary are rounded down instead of up; and this is done somewhat inconsistently. #Example (python v2.7.8, and previous) #almost an odd-even pattern, but not quite for x in [1.045, 1.145, 1.245, 1.345, 1.445, 1.545, 1.645, 1.745