Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.0 - 日本語

Change language to:
English - Français - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilabヘルプ >> Elementary Functions > Discrete mathematics > factorial

factorial

階乗関数

呼び出し手順

f = factorial ( n )

パラメータ

n :

doubleの行列. 値は正の整数である必要があります.

f :

doubleの行列.

説明

nの階乗,つまり,整数 1 * 2 * ... * nの積を返します.

この関数は n > 170 となるとオーバーフローします.

// Make a table of factorial
n = (0:30)';
[n factorial(n)]
// See the limits of factorial: f(171)=%inf
factorial(170) // 7.257415615307998967e306
factorial(171) // %inf
// Plot the function on all its range.
scf();
plot ( 1:170 , factorial , "b-o" )
h = gcf();
h.children.log_flags="nln";

参考文献

Introduction to discrete probabilities, Michael Baudin

Report an issue
<< factor Discrete mathematics gcd >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Feb 14 15:10:27 CET 2017