D.2.2.6 factorial
.................
Procedure from library general.lib (see general_lib).

Usage:
factorial(n[,p]); n,p integers

Return:
factorial(n): n! (computed in characteristic 0), of type string.

 factorial(n,p): n! computed in characteristic 0 or prime(p)

 - of type number if a basering is present and 0=p=char(basering)
or if prime(p)=char(basering)

 - of type string else

Example:
LIB "general.lib";
factorial(37);"";                 //37! of type string (as long integer)
==> 13763753091226345046315979581580902400000000
==> 
ring r1 = 0,x,dp;
number p = factorial(37,0);       //37! of type number, computed in r
p;
==> 13763753091226345046315979581580902400000000
See also:
prime.


<font size="-1">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; User manual for <a href="http://www.singular.uni-kl.de/"><i>Singular</i></a> version 2-0-4, October 2002,
generated by <a href="http://www.gnu.org/software/texinfo/"><i>texi2html</i></a>.
</font>

</body>
</html>
