= 4.1.0, PHP 5, PHP 7, PHP 8)expm1 — 返回 exp(number) - 1,甚至當 number 的值接近零也能計算出準確結果 說明expm1(float $arg): floatexpm1() 返回 'exp(number) - 1',">

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 的指數