Home > Back-end >  Could you tell me why the float variable assignment is 0.3, the output value will be 0.30000001
Could you tell me why the float variable assignment is 0.3, the output value will be 0.30000001

Time:05-11

Floating point precision binary will be lost, and the decimal part to do after effective digit rounded,
Although there are differences in values are outside of the precision of the float
But why the value of the output will be larger than the original value of the


CodePudding user response:

I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
  • Related