是c++數學函式庫,是做題的利器之一
三角函式類
using ::cos; //余弦
using ::cosf; //余弦
using ::cosl; //余弦
using ::acos; //反余弦
using ::acosf; //反余弦
using ::acosl; //反余弦
using ::cosh; //雙曲余弦
using ::coshf; //雙曲余弦
using ::coshl; //雙曲余弦
using ::sin; //正弦
using ::sinf; //正弦
using ::sinl; //正弦
using ::asin; //反正弦
using ::asinf; //反正弦
using ::asinl; //反正弦
using ::sinh; //雙曲正弦
using ::sinhf; //雙曲正弦
using ::sinhl; //雙曲正弦
using ::tan; //正切
using ::tanf; //正切
using ::tanl; //正切
using ::atan; //反正切
using ::atanf; //反正切
using ::atanl; //反正切
using ::tanh; //雙曲正切
using ::tanhf; //雙曲正切
using ::tanhl; //雙曲正切
using ::atan2; //y/x的反正切
using ::atan2f; //y/x的反正切
using ::atan2l; //y/x的反正切
資料處理類
using ::abs; //絕對值
using ::fabs; //絕對值
using ::fabsf; //絕對值
using ::fabsl; //絕對值
using ::ceil; //上取整
using ::ceilf; //上取整
using ::ceill; //上取整
using ::floor; //下取整
using ::floorf; //下取整
using ::floorl; //下取整
using ::fmod; //求餘
using ::fmodf; //求餘
using ::fmodl; //求餘
using ::exp; //指數值
using ::expf; //指數值
using ::expl; //指數值
初等函式
using ::log; //對數
using ::log10; //對數
using ::log10f; //對數
using ::log10l; //對數
using ::logf; //對數
using ::logl; //對數
using ::pow; //計算冪
using ::powf; //計算冪
using ::powl; //計算冪
using ::sqrt; //開方
using ::sqrtf; //開方
using ::sqrtl; //開方
其他using ::frexp; //返回value=x2n中x的值,n存貯在eptr中
using ::frexpf; //返回value=x2n中x的值,n存貯在eptr中
using ::frexpl; //返回value=x*2n中x的值,n存貯在eptr中
using ::ldexp; //返回value2exp的值
using ::ldexpf; //返回value2exp的值
using ::ldexpl; //返回value*2exp的值
using ::modf; //將雙精度數value分解成尾數和階
using ::modff; //將雙精度數value分解成尾數和階
using ::modfl; //將雙精度數value分解成尾數和階
cmath標頭檔案
cmath標頭檔案中常用函式有 取絕對值,x需為double型,若為int型可乘乙個1.0 1.double fabs double x 向上取整,返回小於或等於x的最大整數,如floor 10.5 10.0 floor 10.5 11.0 2.double floor double x 向下取整,...
標準庫標頭檔案 cmath
infinity 正無窮大或保證上溢float的值 huge valf float的上溢值 huge val double的上溢值 huge vall long double的上溢值 nan not a number非數字 float t 至少和float一樣寬的最高效浮點型別 double t 至...
標頭檔案 cmath 函式庫
cmath是c 語言中的庫函式,其中的c表示函式是來自c標準庫的函式,math為數學常用庫函式。cmath中常用庫函式 int abs int i 返回整型引數i的絕對值 double fabs double x 返回雙精度引數x的絕對值 long labs long n 返回長整型引數n的絕對值 ...