commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1167664 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/FastMath.java
Date Sun, 11 Sep 2011 01:50:36 GMT
Author: sebb
Date: Sun Sep 11 01:50:36 2011
New Revision: 1167664

URL: http://svn.apache.org/viewvc?rev=1167664&view=rev
Log:
Factorials look nicer as whole numbers

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/FastMath.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/FastMath.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/FastMath.java?rev=1167664&r1=1167663&r2=1167664&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/FastMath.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/FastMath.java Sun
Sep 11 01:50:36 2011
@@ -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



Mime
View raw message