0
Something very interesting
Do you know if you enter 0.2 + 0.1 in python output is 0.3000000000003? Or you enter 999999999.0 - 999999998.0 output is 2.0???
3 Respostas
0
Python does not handle floats properly. That's why that result occurs. You could just round off to your desired results.
0
Second is true.pleas copy these numbers
9999999999999999.0 - 9999999999999998.0
- 1
The second one isn't right(at least in python3) . But the first one happens because float isn't exact value and it is approximate in python.