To ask if the true and false is random, or there is a regular, thank you.
Reply content:
To ask if the true and false is random, or there is a regular, thank you.
Take a look at a blog post I wrote before.
Code Puzzle (iv)-floating point (from surprise to thinking)
Many floating-point numbers cannot be represented in a computer, and others can be represented, but not accurately expressed.
Add, if you want to do floating-point arithmetic in PHP, use binary Calculator, that is, Bcmath extension
With the round function, see: http://www.tantengvip.com/2015/08/php-float/
If you use the float/double format defined by the IEEE754 standard, unfortunately, you cannot store 0.1 accurately, because the simple binary cannot accurately express this decimal (do not believe you try ~). Similarly, in the calculation of floating-point numbers, it is often unavoidable to lose some precision.
See Shell Technology: Android Calculator low-level error? It's all a binary mess!
For reference: Http://acm.whu.edu.cn/starter/problem ...
Recommended landlord Buy this "in-depth understanding of computer system" to see, the second chapter on the information about how the data stored in the computer, after reading you will understand.
Look at these answers, it's all very well, thank you.