Error saving double in MySQL 5.7 [duplicate]

0

Good morning guys!

I have the following situation: I have 3 fields in my table: nota1, nota2, and final_note (average of the two). All three fields are of type double .

There is a problem saving some averages.

For example:

nota1 = 5.6, nota2 = 5.3, final_note = 5.449999999999999 (While it should be 5.45)

What is the best solution to this problem?

    
asked by anonymous 30.11.2018 / 14:41

0 answers