日本語 English
株式会社ヒューリンクス
TEL:03-5642-8384
営業時間:9:00-17:30

factorial

関数 factorial は、指定した範囲の階乗を返します。

構文

factorial({range})

引数 range には 1つの範囲 ({} で指定)、もしくは、ワークシートの1列を指定します。範囲内に含まれる欠損値や文字列は無視され、文字列や欠損値として返されます。整数でない引数を指定した場合は、最も近い整数または 1 のいずれか大きい方に切り捨てれます。

factorial(x) の場合:

  • x < 0 では欠損値を返します。
  • 0 ≤ x ≤ 170 の時は、x! を返します。
  • x > 170 では +∞ を返します。

例 1

  • factorial({1,2,3,4,5}) は、{1,2,6,24,120} を返します。

例 2

  • ポアソン分布のトランスフォーム関数を作成するには、以下のように入力します:
    Poisson(m,x)=(m^x)*exp(-m)/factorial(x)

factorial

The factorial function returns the factorial of a specified range.

Syntax

factorial({range})

The range argument must be a single range (indicated with the {} brackets) or a worksheet column. Any missing value or text string contained within a range is ignored and returned as the string or missing value. Non-integers are rounded down to the nearest integer or 1, whichever is larger.

For factorial(x):

x < 0 returns a missing value,

0 ≤ x < 180 returns x!, and

x ≥170 returns +∞

Example 1

The operation factorial({1,2,3,4,5}) returns {1,2,6,24,120}.

Example 2

To create a transform equation function for the Poisson distribution, you can type:

Poisson(m,x)=(m^x)*exp(-m)/factorial(x)