0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Π (パイ)、積の記号

Last updated at Posted at 2020-08-31

Π (パイ)

積の記号と呼ばれ、総乗(総積、Product)を表す。
ギリシャ文字の「P」を指す。
繰り返し数値を掛けて、合計を求める時に使用する。

\prod_{k=i}^{n} a

1.「変数[$i$]」は「変数[$k$]」の初期値
2.「変数[$k$]」が「変数[$n$]」の値になるまで「数式[$a$]」の結果を繰り返し掛ける

\prod_{k=i}^{n} a=\prod_{k=0}^{99} f(k)=result
int n = 99;
int i = 0;
int result = 0;
for (int k = i; k <= n; k++){
    result *= f(k);
}
return result;
\prod_{k=i}^{n} a=\prod_{k=1}^{100} 10=result
int n = 100;
int i = 1;
int result = 0;
for (int k = i; k <= n; k++){
    result *= 10;
}
return result;
\prod_{k=i}^{n} a=\prod_{k=3}^{15} (k^2+k)=result
int n = 15;
int i = 3;
int result = 0;
for (int k = i; k <= n; k++){
    result *= (k * k) + k;
}
return result;

・以下のサイトを参考にさせていただきました。
C# 統計・微分積分・線形代数への道 @0kuwa

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?