Final RFR 4837946: Faster multiplication and exponentiation of large integers

Martin Buchholz martinrb at google.com
Wed Jun 19 00:51:42 UTC 2013


As always, I hope that those folks who deeply understand math stuff
can be empowered to submit/review.

Looks good, except for some minor style issues:


Probably want to leave debug print commented out in the final version?

-                //System.err.println(x+": "+bitCount+", "+bigX.bitCount());
+                System.err.println(x+": "+bitCount+", "+bigX.bitCount());


Even for private methods, we should use standard javadoc style, so add
missing asterisks below.

+    /** Returns a slice of a BigInteger for use in Toom-Cook multiplication.
+        @param lowerSize The size of the lower-order bit slices.
+        @param upperSize The size of the higher-order bit slices.
+        @param slice The index of which slice is requested, which must be a
+                     number from 0 to size-1.  Slice 0 is the highest-order
+                     bits, and slice size-1 are the lowest-order bits.
+                     Slice 0 may be of different size than the other slices.
+        @param fullsize The size of the larger integer array, used to align
+                        slices to the appropriate position when multiplying
+                        different-sized numbers.
+    */



More information about the core-libs-dev mailing list