|
==There is still processing for float, you can do an experiment
Change the value of double ff=1.0;
Change to
double ff=1.0000001;
with
double ff=1.00000001;
The other code remains unchanged. Run the program. The result of the previous modification is Cancel, and the latter is OK.
So == is only accurate to 7 digits after the decimal point, and it is lost after 7 digits
As for the case of ff=1.0 mentioned by LZ, the compiler should treat all the following as 0 |
|