zoukankan      html  css  js  c++  java
  • math.h函数库 常用函数

    1. 反三角函数

    •   double asin (double);               结果介于[-PI/2,PI/2]
    •   double acos (double);              结果介于[0,PI]
    •   double atan (double);            反正切(主值), 结果介于[-PI/2,PI/2]
    •   double atan2 (double, double);       反正切(整圆值),结果介于[-PI/2,PI/2]

    2. 指数与对数

    •   double exp (double x);             返回指数函数 e的值
    •   double pow (double x, double y);        返回 x的值
    •   double sqrt (double x);            返回 根号x 的值
    •   double log (double x);               返回 logex 的值
    •   double log10 (double);            返回 log10 的值
    •   若要算以 a 为底的对数:sum=log(x)/log(a); (换底公式)

    3. 绝对值

    •   int abs(int i);              返回整型参数i的绝对值
    •   double cabs(struct complex znum)   返回复数znum的绝对值
    •   double fabs(double x)         返回双精度参数x的绝对值
    •   long labs(long n)            返回长整型参数n的绝对值

  • 相关阅读:
    ArcObjects SDK(AE)10.1在vs2012安装的方法(亲测,并未成功,尝试需谨慎)
    PTA 求链式表的表长
    PTA 输出数组元素
    PTA 找出不是两个数组共有的元素
    PTA 将数组中的数逆序存放
    PTA 利用指针找最大值
    PTA 有序数组的插入
    PTA 冒泡排序
    PTA 报数
    PTA 数组循环右移
  • 原文地址:https://www.cnblogs.com/john1015/p/12926127.html
Copyright © 2011-2022 走看看