IOS开发常用数学函数

1、<wbr style="line-height:36px"></wbr>三角函数<wbr style="line-height:36px"></wbr>
  double sin (double);正弦<wbr style="line-height:36px"></wbr>
  double cos (double);余弦<wbr style="line-height:36px"></wbr>
  double tan (double);正切<wbr style="line-height:36px"></wbr>
  2 、反三角函数<wbr style="line-height:36px"></wbr>
  double asin (double); 结果介于[-PI/2, PI/2]<wbr style="line-height:36px"></wbr>
  double acos (double); 结果介于[0, PI]<wbr style="line-height:36px"></wbr>
  double atan (double); 反正切(主值), 结果介于[-PI/2, PI/2]<wbr style="line-height:36px"></wbr>
  double atan2 (double, double); 反正切(整圆值), 结果介于[-PI, PI]<wbr style="line-height:36px"></wbr>
  3 、双曲三角函数<wbr style="line-height:36px"></wbr>
  double sinh (double);<wbr style="line-height:36px"></wbr>
  double cosh (double);<wbr style="line-height:36px"></wbr>
  double tanh (double);<wbr style="line-height:36px"></wbr>
  4 、指数与对数<wbr style="line-height:36px"></wbr>
  double exp (double);求取自然数e的幂<wbr style="line-height:36px"></wbr>
  double sqrt (double);开平方<wbr style="line-height:36px"></wbr>
  double log (double); 以e为底的对数<wbr style="line-height:36px"></wbr>
  double log10 (double);以10为底的对数<wbr style="line-height:36px"></wbr>
  double pow(double x, double y);计算以x为底数的y次幂<wbr style="line-height:36px"></wbr>
  float powf(float x, float y); 功能与pow一致,只是输入与输出皆为浮点数<wbr style="line-height:36px"></wbr>
  5 、取整<wbr style="line-height:36px"></wbr>
  double ceil (double); 取上整<wbr style="line-height:36px"></wbr>
  double floor (double); 取下整<wbr style="line-height:36px"></wbr>
  6 、绝对值<wbr style="line-height:36px"></wbr>
  double fabs (double);求绝对值<wbr style="line-height:36px"></wbr>
  double cabs(struct complex znum) ;求复数的绝对值<wbr style="line-height:36px"></wbr>
  7 、标准化浮点数<wbr style="line-height:36px"></wbr>
  double frexp (double f, int *p); 标准化浮点数, f = x * 2^p, 已知f求x, p ( x介于[0.5, 1] )<wbr style="line-height:36px"></wbr>
  double ldexp (double x, int p); 与frexp相反, 已知x, p求f<wbr style="line-height:36px"></wbr>
  8 、取整与取余<wbr style="line-height:36px"></wbr>
  double modf (double, double*); 将参数的整数部分通过指针回传, 返回小数部分<wbr style="line-height:36px"></wbr>
  double fmod (double, double); 返回两参数相除的余数<wbr style="line-height:36px"></wbr>
  9 、其他<wbr style="line-height:36px"></wbr>
  double hypot(double x, double y);已知直角三角形两个直角边长度,求斜边长度<wbr style="line-height:36px"></wbr>
  double ldexp(double x, int exponent);计算x*(2的exponent次幂)<wbr style="line-height:36px"></wbr>
  double poly(double x, int degree, double coeffs [] );计算多项式<wbr style="line-height:36px"></wbr>
  nt matherr(struct exception *e);数学错误计算处理程序

Math.h放在哪里?那个是c的函数库:输入一个数学函数,然后双击这个函数-->右键用jump to definition就可以跳到这个头文件里了-->右键选Show in Finder,就知道这个头文件在哪里了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值