
CodePudding user response:
Knock over the code to run not to knowCodePudding user response:
These are foundation of the foundation, carefully look at the intent clearly, floating point number cannot use is equal to the judge, abs (a - b) & lt;=0.0000001, such as the first to determine whether equal, should not write * f1 f2==, I should write abs (f1 * f2 - I) & lt;=0.0000001, specific baidu floating point comparison