PHP Math API Method Summary

Source: Internet
Author: User
Current number of APIs

49

Common Calculations (11)

min — 找出最小值max — 找出最大值abs — 绝对值round — 对浮点数进行四舍五入ceil — 返回大于或者等于指定表达式的最小整数,天花板函数floor —返回小于或者等于指定表达式的最大整数,地板函数intdiv — 对除法结果取整,返回商fmod — 返回除法的浮点数余数,返回余数is_nan — 判断是否为合法数值hypot — 计算一直角三角形的斜边长度sqrt — 平方根

Angle, Radian (3)

pi — 得到圆周率值deg2rad — 将角度转换为弧度rad2deg — 将弧度数转换为相应的角度数

Binary conversion (7)

base_convert — 在任意进制之间转换数字decbin — 十进制转换为二进制bindec — 二进制转换为十进制decoct — 十进制转换为八进制octdec — 八进制转换为十进制dechex — 十进制转换为十六进制hexdec — 十六进制转换为十进制

Random Number (7)

lcg_value — 组合线性同余发生器,返回范围为 (01) 的一个伪随机数rand — 产生一个随机整数,如果没有提供可选参数 min 和 max,rand0 到 RAND_MAX 之间的伪随机整数。mt_rand — 生成更好的随机整数getrandmax — 显示随机数最大的可能值mt_getrandmax — 显示随机数的最大可能值srand4.2.0srand() 或 mt_srand() 函数给随机数发生器播种,现在已自动完成mt_srand — 播下一个更好的随机数发生器种子(Mersenne Twister)

Logarithm (3)

log — 自然对数log1010log(1numbernumber 的值接近零也能计算出准确结果

Index (3)

expexp(number1number 的值接近零也能计算出准确结果pow — 指数表达式

Tangent sine cosine (13)

tan — 正切atan — 反正切tanh — 双曲正切atanh — 反双曲正切atan2 — 两个参数的反正切sin — 正弦asin — 反正弦sinh — 双曲正弦asinh — 反双曲正弦cos — 余弦acos — 反余弦cosh — 双曲余弦acosh — 反双曲余弦

Finite value, infinite value (2)

is_finite — 判断是否为有限值is_infinite — 判断是否为无限值

'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
  • '). Text (i)); }; $numbering. FadeIn (1700); }); });

    The above describes the PHP Math API method summarized, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.