I am using python 3.8.5
to sum a list of floats as follows:
>> prices = [12.3, 11.99, 1.99, 5]
>> sum(prices)
31.279999999999998
here as you see, the sum function is returning a rounded result where the real sum is equal to 31.28
. What sum has a same behaviour?