NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
# Math(核心) 这些数学函数将仅处理计算机上[整数](https://www.php.net/manual/en/language.types.integer.php)和[浮点](https://www.php.net/manual/en/language.types.float.php)类型范围内的值(当前对应于C类型的long resp。double)。如果您需要处理更大的数字,请查看[任意精度数学函数](https://www.php.net/manual/en/book.bc.php) - [预定义常量](https://www.php.net/manual/zh/math.constants.php) - [Math 函数](https://www.php.net/manual/zh/ref.math.php) - [abs](https://www.php.net/manual/zh/function.abs.php)— 绝对值 - [acos](https://www.php.net/manual/zh/function.acos.php)— 反余弦 - [acosh](https://www.php.net/manual/zh/function.acosh.php)— 反双曲余弦 - [asin](https://www.php.net/manual/zh/function.asin.php)— 反正弦 - [asinh](https://www.php.net/manual/zh/function.asinh.php)— 反双曲正弦 - [atan2](https://www.php.net/manual/zh/function.atan2.php)— 两个参数的反正切 - [atan](https://www.php.net/manual/zh/function.atan.php)— 反正切 - [atanh](https://www.php.net/manual/zh/function.atanh.php)— 反双曲正切 - [base\_convert](https://www.php.net/manual/zh/function.base-convert.php)— 在任意进制之间转换数字 - [bindec](https://www.php.net/manual/zh/function.bindec.php)— 二进制转换为十进制 - [ceil](https://www.php.net/manual/zh/function.ceil.php)— 进一法取整 - [cos](https://www.php.net/manual/zh/function.cos.php)— 余弦 - [cosh](https://www.php.net/manual/zh/function.cosh.php)— 双曲余弦 - [decbin](https://www.php.net/manual/zh/function.decbin.php)— 十进制转换为二进制 - [dechex](https://www.php.net/manual/zh/function.dechex.php)— 十进制转换为十六进制 - [decoct](https://www.php.net/manual/zh/function.decoct.php)— 十进制转换为八进制 - [deg2rad](https://www.php.net/manual/zh/function.deg2rad.php)— 将角度转换为弧度 - [exp](https://www.php.net/manual/zh/function.exp.php)— 计算 e 的指数 - [expm1](https://www.php.net/manual/zh/function.expm1.php)— 返回 exp(number) - 1,甚至当 number 的值接近零也能计算出准确结果 - [floor](https://www.php.net/manual/zh/function.floor.php)— 舍去法取整 - [fmod](https://www.php.net/manual/zh/function.fmod.php)— 返回除法的浮点数余数 - [getrandmax](https://www.php.net/manual/zh/function.getrandmax.php)— 显示随机数最大的可能值 - [hexdec](https://www.php.net/manual/zh/function.hexdec.php)— 十六进制转换为十进制 - [hypot](https://www.php.net/manual/zh/function.hypot.php)— 计算一直角三角形的斜边长度 - [intdiv](https://www.php.net/manual/zh/function.intdiv.php)— 对除法结果取整 - [is\_finite](https://www.php.net/manual/zh/function.is-finite.php)— 判断是否为有限值 - [is\_infinite](https://www.php.net/manual/zh/function.is-infinite.php)— 判断是否为无限值 - [is\_nan](https://www.php.net/manual/zh/function.is-nan.php)— 判断是否为合法数值 - [lcg\_value](https://www.php.net/manual/zh/function.lcg-value.php)— 组合线性同余发生器 - [log10](https://www.php.net/manual/zh/function.log10.php)— 以 10 为底的对数 - [log1p](https://www.php.net/manual/zh/function.log1p.php)— 返回 log(1 + number),甚至当 number 的值接近零也能计算出准确结果 - [log](https://www.php.net/manual/zh/function.log.php)— 自然对数 - [max](https://www.php.net/manual/zh/function.max.php)— 找出最大值 - [min](https://www.php.net/manual/zh/function.min.php)— 找出最小值 - [mt\_getrandmax](https://www.php.net/manual/zh/function.mt-getrandmax.php)— 显示随机数的最大可能值 - [mt\_rand](https://www.php.net/manual/zh/function.mt-rand.php)— 生成更好的随机数 - [mt\_srand](https://www.php.net/manual/zh/function.mt-srand.php)— 播下一个更好的随机数发生器种子 - [octdec](https://www.php.net/manual/zh/function.octdec.php)— 八进制转换为十进制 - [pi](https://www.php.net/manual/zh/function.pi.php)— 得到圆周率值 - [pow](https://www.php.net/manual/zh/function.pow.php)— 指数表达式 - [rad2deg](https://www.php.net/manual/zh/function.rad2deg.php)— 将弧度数转换为相应的角度数 - [rand](https://www.php.net/manual/zh/function.rand.php)— 产生一个随机整数 - [round](https://www.php.net/manual/zh/function.round.php)— 对浮点数进行四舍五入 - [sin](https://www.php.net/manual/zh/function.sin.php)— 正弦 - [sinh](https://www.php.net/manual/zh/function.sinh.php)— 双曲正弦 - [sqrt](https://www.php.net/manual/zh/function.sqrt.php)— 平方根 - [srand](https://www.php.net/manual/zh/function.srand.php)— 播下随机数发生器种子 - [tan](https://www.php.net/manual/zh/function.tan.php)— 正切 - [tanh](https://www.php.net/manual/zh/function.tanh.php)— 双曲正切