Factorials look nicer as whole numbers
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1167664 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3ee9c4a7d8
commit
9da9da1eb7
|
@ -5215,26 +5215,26 @@ public class FastMath {
|
|||
/** Factorial table, for Taylor series expansions. 0!, 1!, 2!, ... 19! */
|
||||
private static final double FACT[] = new double[]
|
||||
{
|
||||
+1.0d,
|
||||
+1.0d,
|
||||
+2.0d,
|
||||
+6.0d,
|
||||
+24.0d,
|
||||
+120.0d,
|
||||
+720.0d,
|
||||
+5040.0d,
|
||||
+40320.0d,
|
||||
+362880.0d,
|
||||
+3628800.0d,
|
||||
+3.99168E7d,
|
||||
+4.790016E8d,
|
||||
+6.2270208E9d,
|
||||
+8.71782912E10d,
|
||||
+1.307674368E12d,
|
||||
+2.0922789888E13d,
|
||||
+3.55687428096E14d,
|
||||
+6.402373705728E15d,
|
||||
+1.21645100408832E17d,
|
||||
+1.0d, // 0
|
||||
+1.0d, // 1
|
||||
+2.0d, // 2
|
||||
+6.0d, // 3
|
||||
+24.0d, // 4
|
||||
+120.0d, // 5
|
||||
+720.0d, // 6
|
||||
+5040.0d, // 7
|
||||
+40320.0d, // 8
|
||||
+362880.0d, // 9
|
||||
+3628800.0d, // 10
|
||||
+39916800.0d, // 11
|
||||
+479001600.0d, // 12
|
||||
+6227020800.0d, // 13
|
||||
+87178291200.0d, // 14
|
||||
+1307674368000.0d, // 15
|
||||
+20922789888000.0d, // 16
|
||||
+355687428096000.0d, // 17
|
||||
+6402373705728000.0d, // 18
|
||||
+121645100408832000.0d, // 19
|
||||
};
|
||||
|
||||
private static final int LN_MANT_LEN = 1024; // MAGIC NUMBER
|
||||
|
|
Loading…
Reference in New Issue