Java 8 RFR 8020641: Clean up some code style in recent BigInteger contributions
Joe Darcy
joe.darcy at oracle.com
Wed Jul 17 00:57:00 UTC 2013
Hi Brian,
Please reformat the BigInteger comment at
1915 /* The algorithm requires two divisions by 2 and one by 3.
1916 All divisions are known to be exact, that is, they do
not produce
1917 remainders, and all results are positive. The divisions
by 2 are
1918 implemented as right shifts which are relatively
efficient, leaving
1919 only a division by 3.
1920 The division by 3 is done by an optimized algorithm for
this case.
1921 */
In MutableBigInteger
1486 if(Integer.numberOfLeadingZeros(value[offset]) >= shift) {
1539 for(int j=0; j < limit-1; j++) {
1663 if(needRemainder) {
still need an extra space.
Otherwise, looks good.
Thanks,
-Joe
On 07/16/2013 05:42 PM, Brian Burkhalter wrote:
> Hi Joe,
>
> On Jul 16, 2013, at 4:14 PM, Joe Darcy wrote:
>
>> I've looked over all the code in BigInteger for general consistency
>> of braces, spacing, etc.
>>
>> Besides the changes you're made, here are additional updates to
>> BigInteger:
>
> I fixed all the items you pointed out along with a slew of others I
> found thanks to grep.
>
>> Please take an analogous pass over MutableBigInteger.
>
> Done.
>
> Webrev is updated http://cr.openjdk.java.net/~bpb/8020641/
> <http://cr.openjdk.java.net/%7Ebpb/8020641/>.
>
> As noted, this patch must follow the one for 8014319. (The present
> webrev is generated with the latter revision as base.)
>
> Thanks,
>
> Brian
More information about the core-libs-dev
mailing list