0
x = 0.1+0.1+0.1-0.3 print ('x is {}'.format(x)) print (type(x))
Why output is not 0.
2 Answers
+ 1
The output is something extremely close to 0.
The reason can be referred to this post:
https://stackoverflow.com/questions/588004/is-floating-point-math-broken
0
Thank you..