2010-06-14から1日間の記事一覧

階乗の計算

R

ガンマ関数を用いて n<-10 exp(lgamma(n+1)) gamma(n+1)というのもあり。 cumprod関数を用いて cumprod(1:3) n<-100 cumprod(1:n)[n]というのもあり。