PHP 8.3.4 Released!

expm1

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

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

说明

expm1(float $num): float

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

参数

num

要处理的参数

返回值

enum 次方减 1。

参见

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

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top