+ 1
Python calculation results problems
Why does print(456/10**2) output 4.56 But print((456/10**2)*100) output 455.999999999994 Shouldnât it be 456? Thank you :)
2 Answers
+ 4
1. exponentiation calculated firstly, then division and multiplication
2. processor calculats floating point expressions inaccurately
0
But why though? Is it a flaw in python or just an online compiler mistake?