factorial

Calling Sequence

Parameters

Description

Returns the factorial of n, that is, the product of all
integers 1 * 2 * ... * n.

This function overflows as soon as n>170.

Examples

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