cmath用法大全

1、hypot ,hypotenuse,直角三角形的斜边,返回x,y平方之和的root;
    double hypot (double x     , double y);
      float hypot (float x      , float y);
long double hypot (long double x, long double y);
     double hypot (Type1 x      , Type2 y);       // additional overloads

2、pow, power即加权,base为基数,exponent为指数值;

      

     double pow (double base     , double exponent);
      float pow (float base      , float exponent);
long double pow (long double base, long double exponent);
     double pow (Type1 base      , Type2 exponent);        // additional overloads  

3、sqrt, 即square root

   

     double sqrt (double x);
      float sqrt (float x);
long double sqrt (long double x);
     double sqrt (T x);           // additional overloads for integral types  

4、cbrt, 即cubic root 三方根,用法如上;

   

你可能感兴趣的:(cmath用法大全)