[issue40030] Error with math.fsum() regarding float-point error

2020-03-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

[issue40030] Error with math.fsum() regarding float-point error

2020-03-21 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This seems to be a similar case of https://docs.python.org/3/tutorial/floatingpoint.html. See also comment https://stackoverflow.com/questions/55534307/calculating-sum-of-float-numbers-using-math-fsum-showing-incorrect-values#comment97782231_5553430

[issue40030] Error with math.fsum() regarding float-point error

2020-03-21 Thread Mathias Talbo
New submission from Mathias Talbo : An issue occurs when running the following code. import math math.fsum([0.1, 0.2]), math.fsum([0.1, 0.7]) This should output 0.3, 0.8 respectively. Instead, it output 0.30004, 0.7999 The very floating-point error it is trying to st