Home > Back-end >  There are multiple overloaded function about SQRT solution of the problem
There are multiple overloaded function about SQRT solution of the problem

Time:10-16

1. The SQRT (a) to SQRT (1.0 * a)
2. The definition of the data to double or float type
Because the compiler doesn't know what do you want to use double or float, so this is the first kind of method is widely used

CodePudding user response:

To set the type double is run out of things
The first case, not processing, function parameters can be expressions, after calculating the results to the value in the
The second case, the counselor is the type double, you send ginseng to his float type, the compiler will automatically do type conversion
  • Related