Answer the question
In order to leave comments, you need to log in
Error when adding float numbers, what's wrong?
there is a database where real numbers are stored, I pull them out from there and add them to the total number, but for some reason 325.40000000000003 comes out of these numbers 23.0 / 15.0 / 70.0 / 61.0 / 61.2 / 6.0 / 33.0 / 15.0 / 35.3 - these the numbers that I pull out of the database, which are stored there as real
But in python, floating point numbers are floats - maybe this is the case?
Answer the question
In order to leave comments, you need to log in
Use the data type for storage in the database not Float, but Decimal
What is the difference between Float, Double and Decimal in MySQL
There is another option to add them in the database with a query
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question