expm1 返回 exp(number) - 1,甚至当 number 的值接近零也能计算出准确结果

发表日期:2021-07-01 08:56:06 | 来源: | | 浏览(756) 分类:Math 函数

expm1

(PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8)

expm1 返回 exp(number) - 1,甚至当 number 的值接近零也能计算出准确结果

说明

expm1(float $arg): float

expm1() 返回 'exp(number) - 1',甚至当 number 的值接近零也能计算出准确结果。但是当两个数值趋近于相等的时候, 'exp (number) - 1' 就会变得不太准确。

参数

arg

要处理的参数

返回值

'e' to the power of arg minus one

更新日志

版本 说明
5.3.0 此函数在所有平台上均可用

参见

  • log1p() - 返回 log(1 + number),甚至当 number 的值接近零也能计算出准确结果
  • exp() - 计算 e 的指数

集速网 copyRight © 2015-2022 宁ICP备15000399号-1 宁公网安备 64010402001209号
与其临渊羡鱼,不如退而结网
欢迎转载、分享、引用、推荐、收藏。