共用方式為


ApproximateFactorial 函式

完整名稱:Std.Math.ApproximateFactorial

function ApproximateFactorial(n : Int) : Double

總結

傳回指定數位的近似乘積。

描述

根據輸入 n,傳回 Double的因數。 這個函式的輸入定義域 n <= 169

言論

針對 n > 10,此函式會使用 Ramanujan 近似值,其相對錯誤的順序為 1 / n⁵。

輸入

n

要採用近似因數的數位。 不得為負數。

輸出

n的近似因數。

另請參閱

  • Microsoft.Quantum.Math.FactorialI
  • Microsoft.Quantum.Math.FactorialL