18 * Returns factorial of i = 1 * 2 * 3 * ... * i.
21 * Due to machine arithmetic bounds the largest value of
22 * i accepted is 33 in single precision arithmetic.
23 * Greater values, or negative ones,
24 * produce an error message and return MAXNUM.
30 * For i < 34 the values are simply tabulated, and have
31 * full machine accuracy.
36 Cephes Math Library Release 2.0: April, 1987
37 Copyright 1984, 1987 by Stephen L. Moshier
38 Direct inquiries to 30 Frost Street, Cambridge, MA 02140
43 /* Factorials of integers from 0 through 33 */
44 static double factbl[] = {
45 1.00000000000000000000E0,
46 1.00000000000000000000E0,
47 2.00000000000000000000E0,
48 6.00000000000000000000E0,
49 2.40000000000000000000E1,
50 1.20000000000000000000E2,
51 7.20000000000000000000E2,
52 5.04000000000000000000E3,
53 4.03200000000000000000E4,
54 3.62880000000000000000E5,
55 3.62880000000000000000E6,
56 3.99168000000000000000E7,
57 4.79001600000000000000E8,
58 6.22702080000000000000E9,
59 8.71782912000000000000E10,
60 1.30767436800000000000E12,
61 2.09227898880000000000E13,
62 3.55687428096000000000E14,
63 6.40237370572800000000E15,
64 1.21645100408832000000E17,
65 2.43290200817664000000E18,
66 5.10909421717094400000E19,
67 1.12400072777760768000E21,
68 2.58520167388849766400E22,
69 6.20448401733239439360E23,
70 1.55112100433309859840E25,
71 4.03291461126605635584E26,
72 1.0888869450418352160768E28,
73 3.04888344611713860501504E29,
74 8.841761993739701954543616E30,
75 2.6525285981219105863630848E32,
76 8.22283865417792281772556288E33,
77 2.6313083693369353016721801216E35,
78 8.68331761881188649551819440128E36
82 extern double MAXNUMF;
94 mtherr( "facf", SING );
100 mtherr( "facf", OVERFLOW );
104 /* Get answer from table for small i. */