public final class com.google.common.math.BigIntegerMath
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: com.google.common.math.BigIntegerMath
super_class: java.lang.Object
{
static final int SQRT2_PRECOMPUTE_THRESHOLD;
descriptor: I
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: 256
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
static final java.math.BigInteger SQRT2_PRECOMPUTED_BITS;
descriptor: Ljava/math/BigInteger;
flags: (0x0018) ACC_STATIC, ACC_FINAL
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
private static final double LN_10;
descriptor: D
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final double LN_2;
descriptor: D
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static volatile int[] $SWITCH_TABLE$java$math$RoundingMode;
descriptor: [I
flags: (0x104a) ACC_PRIVATE, ACC_STATIC, ACC_VOLATILE, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=0, args_size=0
0: new java.math.BigInteger
dup
ldc "16a09e667f3bcc908b2fb1366ea957d3e3adec17512775099da2f590b0667322a"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
1: putstatic com.google.common.math.BigIntegerMath.SQRT2_PRECOMPUTED_BITS:Ljava/math/BigInteger;
2: ldc 10.0
invokestatic java.lang.Math.log:(D)D
putstatic com.google.common.math.BigIntegerMath.LN_10:D
3: ldc 2.0
invokestatic java.lang.Math.log:(D)D
putstatic com.google.common.math.BigIntegerMath.LN_2:D
return
LocalVariableTable:
Start End Slot Name Signature
public static java.math.BigInteger ceilingPowerOfTwo(java.math.BigInteger);
descriptor: (Ljava/math/BigInteger;)Ljava/math/BigInteger;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: getstatic java.math.BigInteger.ZERO:Ljava/math/BigInteger;
aload 0
getstatic java.math.RoundingMode.CEILING:Ljava/math/RoundingMode;
invokestatic com.google.common.math.BigIntegerMath.log2:(Ljava/math/BigInteger;Ljava/math/RoundingMode;)I
invokevirtual java.math.BigInteger.setBit:(I)Ljava/math/BigInteger;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 x Ljava/math/BigInteger;
RuntimeInvisibleAnnotations:
com.google.common.annotations.Beta()
MethodParameters:
Name Flags
x
public static java.math.BigInteger floorPowerOfTwo(java.math.BigInteger);
descriptor: (Ljava/math/BigInteger;)Ljava/math/BigInteger;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: getstatic java.math.BigInteger.ZERO:Ljava/math/BigInteger;
aload 0
getstatic java.math.RoundingMode.FLOOR:Ljava/math/RoundingMode;
invokestatic com.google.common.math.BigIntegerMath.log2:(Ljava/math/BigInteger;Ljava/math/RoundingMode;)I
invokevirtual java.math.BigInteger.setBit:(I)Ljava/math/BigInteger;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 x Ljava/math/BigInteger;
RuntimeInvisibleAnnotations:
com.google.common.annotations.Beta()
MethodParameters:
Name Flags
x
public static boolean isPowerOfTwo(java.math.BigInteger);
descriptor: (Ljava/math/BigInteger;)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 0
invokevirtual java.math.BigInteger.signum:()I
ifle 2
aload 0
invokevirtual java.math.BigInteger.getLowestSetBit:()I
aload 0
invokevirtual java.math.BigInteger.bitLength:()I
iconst_1
isub
if_icmpne 2
iconst_1
ireturn
StackMap locals:
StackMap stack:
2: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 x Ljava/math/BigInteger;
MethodParameters:
Name Flags
x
public static int log2(java.math.BigInteger, java.math.RoundingMode);
descriptor: (Ljava/math/BigInteger;Ljava/math/RoundingMode;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=5, args_size=2
start local 0 start local 1 0: ldc "x"
aload 0
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.math.BigInteger
invokestatic com.google.common.math.MathPreconditions.checkPositive:(Ljava/lang/String;Ljava/math/BigInteger;)Ljava/math/BigInteger;
pop
1: aload 0
invokevirtual java.math.BigInteger.bitLength:()I
iconst_1
isub
istore 2
start local 2 2: invokestatic com.google.common.math.BigIntegerMath.$SWITCH_TABLE$java$math$RoundingMode:()[I
aload 1
invokevirtual java.math.RoundingMode.ordinal:()I
iaload
tableswitch { // 1 - 8
1: 5
2: 4
3: 5
4: 4
5: 8
6: 8
7: 8
8: 3
default: 19
}
3: StackMap locals: int
StackMap stack:
aload 0
invokestatic com.google.common.math.BigIntegerMath.isPowerOfTwo:(Ljava/math/BigInteger;)Z
invokestatic com.google.common.math.MathPreconditions.checkRoundingUnnecessary:(Z)V
4: StackMap locals:
StackMap stack:
iload 2
ireturn
5: StackMap locals:
StackMap stack:
aload 0
invokestatic com.google.common.math.BigIntegerMath.isPowerOfTwo:(Ljava/math/BigInteger;)Z
ifeq 6
iload 2
goto 7
StackMap locals:
StackMap stack:
6: iload 2
iconst_1
iadd
StackMap locals:
StackMap stack: int
7: ireturn
8: StackMap locals:
StackMap stack:
iload 2
sipush 256
if_icmpge 14
9: getstatic com.google.common.math.BigIntegerMath.SQRT2_PRECOMPUTED_BITS:Ljava/math/BigInteger;
sipush 256
iload 2
isub
invokevirtual java.math.BigInteger.shiftRight:(I)Ljava/math/BigInteger;
10: astore 3
start local 3 11: aload 0
aload 3
invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
ifgt 13
12: iload 2
ireturn
13: StackMap locals: java.math.BigInteger
StackMap stack:
iload 2
iconst_1
iadd
ireturn
end local 3 14: StackMap locals:
StackMap stack:
aload 0
iconst_2
invokevirtual java.math.BigInteger.pow:(I)Ljava/math/BigInteger;
astore 3
start local 3 15: aload 3
invokevirtual java.math.BigInteger.bitLength:()I
iconst_1
isub
istore 4
start local 4 16: iload 4
iconst_2
iload 2
imul
iconst_1
iadd
if_icmpge 17
iload 2
goto 18
StackMap locals: java.math.BigInteger int
StackMap stack:
17: iload 2
iconst_1
iadd
StackMap locals:
StackMap stack: int
18: ireturn
end local 4 end local 3 19: StackMap locals:
StackMap stack:
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 x Ljava/math/BigInteger;
0 20 1 mode Ljava/math/RoundingMode;
2 20 2 logFloor I
11 14 3 halfPower Ljava/math/BigInteger;
15 19 3 x2 Ljava/math/BigInteger;
16 19 4 logX2Floor I
MethodParameters:
Name Flags
x
mode
public static int log10(java.math.BigInteger, java.math.RoundingMode);
descriptor: (Ljava/math/BigInteger;Ljava/math/RoundingMode;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=10, args_size=2
start local 0 start local 1 0: ldc "x"
aload 0
invokestatic com.google.common.math.MathPreconditions.checkPositive:(Ljava/lang/String;Ljava/math/BigInteger;)Ljava/math/BigInteger;
pop
1: aload 0
invokestatic com.google.common.math.BigIntegerMath.fitsInLong:(Ljava/math/BigInteger;)Z
ifeq 3
2: aload 0
invokevirtual java.math.BigInteger.longValue:()J
aload 1
invokestatic com.google.common.math.LongMath.log10:(JLjava/math/RoundingMode;)I
ireturn
3: StackMap locals:
StackMap stack:
aload 0
getstatic java.math.RoundingMode.FLOOR:Ljava/math/RoundingMode;
invokestatic com.google.common.math.BigIntegerMath.log2:(Ljava/math/BigInteger;Ljava/math/RoundingMode;)I
i2d
getstatic com.google.common.math.BigIntegerMath.LN_2:D
dmul
getstatic com.google.common.math.BigIntegerMath.LN_10:D
ddiv
d2i
istore 2
start local 2 4: getstatic java.math.BigInteger.TEN:Ljava/math/BigInteger;
iload 2
invokevirtual java.math.BigInteger.pow:(I)Ljava/math/BigInteger;
astore 3
start local 3 5: aload 3
aload 0
invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
istore 4
start local 4 6: iload 4
ifle 13
7: StackMap locals: int java.math.BigInteger int
StackMap stack:
iinc 2 -1
8: aload 3
getstatic java.math.BigInteger.TEN:Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.divide:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 3
9: aload 3
aload 0
invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
istore 4
10: iload 4
11: ifgt 7
12: goto 22
13: StackMap locals:
StackMap stack:
getstatic java.math.BigInteger.TEN:Ljava/math/BigInteger;
aload 3
invokevirtual java.math.BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 5
start local 5 14: aload 5
aload 0
invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
istore 6
start local 6 15: goto 21
16: StackMap locals: java.math.BigInteger int
StackMap stack:
iinc 2 1
17: aload 5
astore 3
18: iload 6
istore 4
19: getstatic java.math.BigInteger.TEN:Ljava/math/BigInteger;
aload 3
invokevirtual java.math.BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 5
20: aload 5
aload 0
invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
istore 6
21: StackMap locals:
StackMap stack:
iload 6
ifle 16
end local 6 end local 5 22: StackMap locals:
StackMap stack:
iload 2
istore 5
start local 5 23: aload 3
astore 6
start local 6 24: iload 4
istore 7
start local 7 25: invokestatic com.google.common.math.BigIntegerMath.$SWITCH_TABLE$java$math$RoundingMode:()[I
aload 1
invokevirtual java.math.RoundingMode.ordinal:()I
iaload
tableswitch { // 1 - 8
1: 30
2: 29
3: 30
4: 29
5: 33
6: 33
7: 33
8: 26
default: 38
}
26: StackMap locals: int java.math.BigInteger int
StackMap stack:
iload 7
ifne 27
iconst_1
goto 28
StackMap locals:
StackMap stack:
27: iconst_0
StackMap locals:
StackMap stack: int
28: invokestatic com.google.common.math.MathPreconditions.checkRoundingUnnecessary:(Z)V
29: StackMap locals:
StackMap stack:
iload 5
ireturn
30: StackMap locals:
StackMap stack:
aload 6
aload 0
invokevirtual java.math.BigInteger.equals:(Ljava/lang/Object;)Z
ifeq 31
iload 5
goto 32
StackMap locals:
StackMap stack:
31: iload 5
iconst_1
iadd
StackMap locals:
StackMap stack: int
32: ireturn
33: StackMap locals:
StackMap stack:
aload 0
iconst_2
invokevirtual java.math.BigInteger.pow:(I)Ljava/math/BigInteger;
astore 8
start local 8 34: aload 6
iconst_2
invokevirtual java.math.BigInteger.pow:(I)Ljava/math/BigInteger;
getstatic java.math.BigInteger.TEN:Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 9
start local 9 35: aload 8
aload 9
invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
ifgt 36
iload 5
goto 37
StackMap locals: java.math.BigInteger java.math.BigInteger
StackMap stack:
36: iload 5
iconst_1
iadd
StackMap locals:
StackMap stack: int
37: ireturn
end local 9 end local 8 38: StackMap locals:
StackMap stack:
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 39 0 x Ljava/math/BigInteger;
0 39 1 mode Ljava/math/RoundingMode;
4 39 2 approxLog10 I
5 39 3 approxPow Ljava/math/BigInteger;
6 39 4 approxCmp I
14 22 5 nextPow Ljava/math/BigInteger;
15 22 6 nextCmp I
23 39 5 floorLog I
24 39 6 floorPow Ljava/math/BigInteger;
25 39 7 floorCmp I
34 38 8 x2 Ljava/math/BigInteger;
35 38 9 halfPowerSquared Ljava/math/BigInteger;
RuntimeInvisibleAnnotations:
com.google.common.annotations.GwtIncompatible()
MethodParameters:
Name Flags
x
mode
public static java.math.BigInteger sqrt(java.math.BigInteger, java.math.RoundingMode);
descriptor: (Ljava/math/BigInteger;Ljava/math/RoundingMode;)Ljava/math/BigInteger;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=6, args_size=2
start local 0 start local 1 0: ldc "x"
aload 0
invokestatic com.google.common.math.MathPreconditions.checkNonNegative:(Ljava/lang/String;Ljava/math/BigInteger;)Ljava/math/BigInteger;
pop
1: aload 0
invokestatic com.google.common.math.BigIntegerMath.fitsInLong:(Ljava/math/BigInteger;)Z
ifeq 3
2: aload 0
invokevirtual java.math.BigInteger.longValue:()J
aload 1
invokestatic com.google.common.math.LongMath.sqrt:(JLjava/math/RoundingMode;)J
invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
areturn
3: StackMap locals:
StackMap stack:
aload 0
invokestatic com.google.common.math.BigIntegerMath.sqrtFloor:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 2
start local 2 4: invokestatic com.google.common.math.BigIntegerMath.$SWITCH_TABLE$java$math$RoundingMode:()[I
aload 1
invokevirtual java.math.RoundingMode.ordinal:()I
iaload
tableswitch { // 1 - 8
1: 7
2: 6
3: 7
4: 6
5: 16
6: 16
7: 16
8: 5
default: 20
}
5: StackMap locals: java.math.BigInteger
StackMap stack:
aload 2
iconst_2
invokevirtual java.math.BigInteger.pow:(I)Ljava/math/BigInteger;
aload 0
invokevirtual java.math.BigInteger.equals:(Ljava/lang/Object;)Z
invokestatic com.google.common.math.MathPreconditions.checkRoundingUnnecessary:(Z)V
6: StackMap locals:
StackMap stack:
aload 2
areturn
7: StackMap locals:
StackMap stack:
aload 2
invokevirtual java.math.BigInteger.intValue:()I
istore 3
start local 3 8: iload 3
iload 3
imul
aload 0
invokevirtual java.math.BigInteger.intValue:()I
if_icmpne 11
9: aload 2
iconst_2
invokevirtual java.math.BigInteger.pow:(I)Ljava/math/BigInteger;
aload 0
invokevirtual java.math.BigInteger.equals:(Ljava/lang/Object;)Z
ifeq 11
10: iconst_1
goto 12
StackMap locals: int
StackMap stack:
11: iconst_0
StackMap locals:
StackMap stack: int
12: istore 4
start local 4 13: iload 4
ifeq 14
aload 2
goto 15
StackMap locals: int
StackMap stack:
14: aload 2
getstatic java.math.BigInteger.ONE:Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.add:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
StackMap locals:
StackMap stack: java.math.BigInteger
15: areturn
end local 4 end local 3 16: StackMap locals:
StackMap stack:
aload 2
iconst_2
invokevirtual java.math.BigInteger.pow:(I)Ljava/math/BigInteger;
aload 2
invokevirtual java.math.BigInteger.add:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 5
start local 5 17: aload 5
aload 0
invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
iflt 18
aload 2
goto 19
StackMap locals: java.math.BigInteger java.math.RoundingMode java.math.BigInteger top top java.math.BigInteger
StackMap stack:
18: aload 2
getstatic java.math.BigInteger.ONE:Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.add:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
StackMap locals:
StackMap stack: java.math.BigInteger
19: areturn
end local 5 20: StackMap locals: java.math.BigInteger java.math.RoundingMode java.math.BigInteger
StackMap stack:
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 21 0 x Ljava/math/BigInteger;
0 21 1 mode Ljava/math/RoundingMode;
4 21 2 sqrtFloor Ljava/math/BigInteger;
8 16 3 sqrtFloorInt I
13 16 4 sqrtFloorIsExact Z
17 20 5 halfSquare Ljava/math/BigInteger;
RuntimeInvisibleAnnotations:
com.google.common.annotations.GwtIncompatible()
MethodParameters:
Name Flags
x
mode
private static java.math.BigInteger sqrtFloor(java.math.BigInteger);
descriptor: (Ljava/math/BigInteger;)Ljava/math/BigInteger;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=4, args_size=1
start local 0 0: aload 0
getstatic java.math.RoundingMode.FLOOR:Ljava/math/RoundingMode;
invokestatic com.google.common.math.BigIntegerMath.log2:(Ljava/math/BigInteger;Ljava/math/RoundingMode;)I
istore 2
start local 2 1: iload 2
sipush 1023
if_icmpge 4
2: aload 0
invokestatic com.google.common.math.BigIntegerMath.sqrtApproxWithDoubles:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 1
start local 1 3: goto 6
end local 1 4: StackMap locals: java.math.BigInteger top int
StackMap stack:
iload 2
bipush 52
isub
bipush -2
iand
istore 3
start local 3 5: aload 0
iload 3
invokevirtual java.math.BigInteger.shiftRight:(I)Ljava/math/BigInteger;
invokestatic com.google.common.math.BigIntegerMath.sqrtApproxWithDoubles:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
iload 3
iconst_1
ishr
invokevirtual java.math.BigInteger.shiftLeft:(I)Ljava/math/BigInteger;
astore 1
end local 3 start local 1 6: StackMap locals: java.math.BigInteger java.math.BigInteger int
StackMap stack:
aload 1
aload 0
aload 1
invokevirtual java.math.BigInteger.divide:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.add:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
iconst_1
invokevirtual java.math.BigInteger.shiftRight:(I)Ljava/math/BigInteger;
astore 3
start local 3 7: aload 1
aload 3
invokevirtual java.math.BigInteger.equals:(Ljava/lang/Object;)Z
ifeq 9
8: aload 1
areturn
9: StackMap locals: java.math.BigInteger
StackMap stack:
aload 3
astore 1
10: aload 1
aload 0
aload 1
invokevirtual java.math.BigInteger.divide:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.add:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
iconst_1
invokevirtual java.math.BigInteger.shiftRight:(I)Ljava/math/BigInteger;
astore 3
11: aload 3
aload 1
invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
12: iflt 9
13: aload 1
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 x Ljava/math/BigInteger;
3 4 1 sqrt0 Ljava/math/BigInteger;
6 14 1 sqrt0 Ljava/math/BigInteger;
1 14 2 log2 I
5 6 3 shift I
7 14 3 sqrt1 Ljava/math/BigInteger;
RuntimeInvisibleAnnotations:
com.google.common.annotations.GwtIncompatible()
MethodParameters:
Name Flags
x
private static java.math.BigInteger sqrtApproxWithDoubles(java.math.BigInteger);
descriptor: (Ljava/math/BigInteger;)Ljava/math/BigInteger;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
invokestatic com.google.common.math.DoubleUtils.bigToDouble:(Ljava/math/BigInteger;)D
invokestatic java.lang.Math.sqrt:(D)D
getstatic java.math.RoundingMode.HALF_EVEN:Ljava/math/RoundingMode;
invokestatic com.google.common.math.DoubleMath.roundToBigInteger:(DLjava/math/RoundingMode;)Ljava/math/BigInteger;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 x Ljava/math/BigInteger;
RuntimeInvisibleAnnotations:
com.google.common.annotations.GwtIncompatible()
MethodParameters:
Name Flags
x
public static java.math.BigInteger divide(java.math.BigInteger, java.math.BigInteger, java.math.RoundingMode);
descriptor: (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/RoundingMode;)Ljava/math/BigInteger;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=5, args_size=3
start local 0 start local 1 start local 2 0: new java.math.BigDecimal
dup
aload 0
invokespecial java.math.BigDecimal.<init>:(Ljava/math/BigInteger;)V
astore 3
start local 3 1: new java.math.BigDecimal
dup
aload 1
invokespecial java.math.BigDecimal.<init>:(Ljava/math/BigInteger;)V
astore 4
start local 4 2: aload 3
aload 4
iconst_0
aload 2
invokevirtual java.math.BigDecimal.divide:(Ljava/math/BigDecimal;ILjava/math/RoundingMode;)Ljava/math/BigDecimal;
invokevirtual java.math.BigDecimal.toBigIntegerExact:()Ljava/math/BigInteger;
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 p Ljava/math/BigInteger;
0 3 1 q Ljava/math/BigInteger;
0 3 2 mode Ljava/math/RoundingMode;
1 3 3 pDec Ljava/math/BigDecimal;
2 3 4 qDec Ljava/math/BigDecimal;
RuntimeInvisibleAnnotations:
com.google.common.annotations.GwtIncompatible()
MethodParameters:
Name Flags
p
q
mode
public static java.math.BigInteger factorial(int);
descriptor: (I)Ljava/math/BigInteger;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=16, args_size=1
start local 0 0: ldc "n"
iload 0
invokestatic com.google.common.math.MathPreconditions.checkNonNegative:(Ljava/lang/String;I)I
pop
1: iload 0
getstatic com.google.common.math.LongMath.factorials:[J
arraylength
if_icmpge 3
2: getstatic com.google.common.math.LongMath.factorials:[J
iload 0
laload
invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
areturn
3: StackMap locals:
StackMap stack:
iload 0
iload 0
getstatic java.math.RoundingMode.CEILING:Ljava/math/RoundingMode;
invokestatic com.google.common.math.IntMath.log2:(ILjava/math/RoundingMode;)I
imul
bipush 64
getstatic java.math.RoundingMode.CEILING:Ljava/math/RoundingMode;
invokestatic com.google.common.math.IntMath.divide:(IILjava/math/RoundingMode;)I
istore 1
start local 1 4: new java.util.ArrayList
dup
iload 1
invokespecial java.util.ArrayList.<init>:(I)V
astore 2
start local 2 5: getstatic com.google.common.math.LongMath.factorials:[J
arraylength
istore 3
start local 3 6: getstatic com.google.common.math.LongMath.factorials:[J
iload 3
iconst_1
isub
laload
lstore 4
start local 4 7: lload 4
invokestatic java.lang.Long.numberOfTrailingZeros:(J)I
istore 6
start local 6 8: lload 4
iload 6
lshr
lstore 4
9: lload 4
getstatic java.math.RoundingMode.FLOOR:Ljava/math/RoundingMode;
invokestatic com.google.common.math.LongMath.log2:(JLjava/math/RoundingMode;)I
iconst_1
iadd
istore 7
start local 7 10: iload 3
i2l
getstatic java.math.RoundingMode.FLOOR:Ljava/math/RoundingMode;
invokestatic com.google.common.math.LongMath.log2:(JLjava/math/RoundingMode;)I
iconst_1
iadd
istore 8
start local 8 11: iconst_1
iload 8
iconst_1
isub
ishl
istore 9
start local 9 12: iload 3
i2l
lstore 10
start local 10 13: goto 28
14: StackMap locals: int int java.util.ArrayList int long int int int int long
StackMap stack:
lload 10
iload 9
i2l
land
lconst_0
lcmp
ifeq 17
15: iload 9
iconst_1
ishl
istore 9
16: iinc 8 1
17: StackMap locals:
StackMap stack:
lload 10
invokestatic java.lang.Long.numberOfTrailingZeros:(J)I
istore 12
start local 12 18: lload 10
iload 12
lshr
lstore 13
start local 13 19: iload 6
iload 12
iadd
istore 6
20: iload 8
iload 12
isub
istore 15
start local 15 21: iload 15
iload 7
iadd
bipush 64
if_icmplt 25
22: aload 2
lload 4
invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
invokevirtual java.util.ArrayList.add:(Ljava/lang/Object;)Z
pop
23: lconst_1
lstore 4
24: iconst_0
istore 7
25: StackMap locals: int long int
StackMap stack:
lload 4
lload 13
lmul
lstore 4
26: lload 4
getstatic java.math.RoundingMode.FLOOR:Ljava/math/RoundingMode;
invokestatic com.google.common.math.LongMath.log2:(JLjava/math/RoundingMode;)I
iconst_1
iadd
istore 7
end local 15 end local 13 end local 12 27: lload 10
lconst_1
ladd
lstore 10
StackMap locals:
StackMap stack:
28: lload 10
iload 0
i2l
lcmp
ifle 14
end local 10 29: lload 4
lconst_1
lcmp
ifle 31
30: aload 2
lload 4
invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
invokevirtual java.util.ArrayList.add:(Ljava/lang/Object;)Z
pop
31: StackMap locals:
StackMap stack:
aload 2
invokestatic com.google.common.math.BigIntegerMath.listProduct:(Ljava/util/List;)Ljava/math/BigInteger;
iload 6
invokevirtual java.math.BigInteger.shiftLeft:(I)Ljava/math/BigInteger;
areturn
end local 9 end local 8 end local 7 end local 6 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 32 0 n I
4 32 1 approxSize I
5 32 2 bignums Ljava/util/ArrayList<Ljava/math/BigInteger;>;
6 32 3 startingNumber I
7 32 4 product J
8 32 6 shift I
10 32 7 productBits I
11 32 8 bits I
12 32 9 nextPowerOfTwo I
13 29 10 num J
18 27 12 tz I
19 27 13 normalizedNum J
21 27 15 normalizedBits I
MethodParameters:
Name Flags
n
static java.math.BigInteger listProduct(java.util.List<java.math.BigInteger>);
descriptor: (Ljava/util/List;)Ljava/math/BigInteger;
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
iconst_0
aload 0
invokeinterface java.util.List.size:()I
invokestatic com.google.common.math.BigIntegerMath.listProduct:(Ljava/util/List;II)Ljava/math/BigInteger;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 nums Ljava/util/List<Ljava/math/BigInteger;>;
Signature: (Ljava/util/List<Ljava/math/BigInteger;>;)Ljava/math/BigInteger;
MethodParameters:
Name Flags
nums
static java.math.BigInteger listProduct(java.util.List<java.math.BigInteger>, int, int);
descriptor: (Ljava/util/List;II)Ljava/math/BigInteger;
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=4, args_size=3
start local 0 start local 1 start local 2 0: iload 2
iload 1
isub
tableswitch { // 0 - 3
0: 1
1: 2
2: 3
3: 4
default: 5
}
1: StackMap locals:
StackMap stack:
getstatic java.math.BigInteger.ONE:Ljava/math/BigInteger;
areturn
2: StackMap locals:
StackMap stack:
aload 0
iload 1
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.math.BigInteger
areturn
3: StackMap locals:
StackMap stack:
aload 0
iload 1
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.math.BigInteger
aload 0
iload 1
iconst_1
iadd
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.math.BigInteger
invokevirtual java.math.BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
areturn
4: StackMap locals:
StackMap stack:
aload 0
iload 1
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.math.BigInteger
aload 0
iload 1
iconst_1
iadd
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.math.BigInteger
invokevirtual java.math.BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
aload 0
iload 1
iconst_2
iadd
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.math.BigInteger
invokevirtual java.math.BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
areturn
5: StackMap locals:
StackMap stack:
iload 2
iload 1
iadd
iconst_1
iushr
istore 3
start local 3 6: aload 0
iload 1
iload 3
invokestatic com.google.common.math.BigIntegerMath.listProduct:(Ljava/util/List;II)Ljava/math/BigInteger;
aload 0
iload 3
iload 2
invokestatic com.google.common.math.BigIntegerMath.listProduct:(Ljava/util/List;II)Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 nums Ljava/util/List<Ljava/math/BigInteger;>;
0 7 1 start I
0 7 2 end I
6 7 3 m I
Signature: (Ljava/util/List<Ljava/math/BigInteger;>;II)Ljava/math/BigInteger;
MethodParameters:
Name Flags
nums
start
end
public static java.math.BigInteger binomial(int, int);
descriptor: (II)Ljava/math/BigInteger;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=12, args_size=2
start local 0 start local 1 0: ldc "n"
iload 0
invokestatic com.google.common.math.MathPreconditions.checkNonNegative:(Ljava/lang/String;I)I
pop
1: ldc "k"
iload 1
invokestatic com.google.common.math.MathPreconditions.checkNonNegative:(Ljava/lang/String;I)I
pop
2: iload 1
iload 0
if_icmpgt 3
iconst_1
goto 4
StackMap locals:
StackMap stack:
3: iconst_0
StackMap locals:
StackMap stack: int
4: ldc "k (%s) > n (%s)"
iload 1
iload 0
invokestatic com.google.common.base.Preconditions.checkArgument:(ZLjava/lang/String;II)V
5: iload 1
iload 0
iconst_1
ishr
if_icmple 7
6: iload 0
iload 1
isub
istore 1
7: StackMap locals:
StackMap stack:
iload 1
getstatic com.google.common.math.LongMath.biggestBinomials:[I
arraylength
if_icmpge 9
iload 0
getstatic com.google.common.math.LongMath.biggestBinomials:[I
iload 1
iaload
if_icmpgt 9
8: iload 0
iload 1
invokestatic com.google.common.math.LongMath.binomial:(II)J
invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
areturn
9: StackMap locals:
StackMap stack:
getstatic java.math.BigInteger.ONE:Ljava/math/BigInteger;
astore 2
start local 2 10: iload 0
i2l
lstore 3
start local 3 11: lconst_1
lstore 5
start local 5 12: iload 0
i2l
getstatic java.math.RoundingMode.CEILING:Ljava/math/RoundingMode;
invokestatic com.google.common.math.LongMath.log2:(JLjava/math/RoundingMode;)I
istore 7
start local 7 13: iload 7
istore 8
start local 8 14: iconst_1
istore 9
start local 9 15: goto 31
16: StackMap locals: int int java.math.BigInteger long long int int int
StackMap stack:
iload 0
iload 9
isub
istore 10
start local 10 17: iload 9
iconst_1
iadd
istore 11
start local 11 18: iload 8
iload 7
iadd
bipush 63
if_icmplt 27
19: aload 2
20: lload 3
invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
21: lload 5
invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.divide:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
22: astore 2
23: iload 10
i2l
lstore 3
24: iload 11
i2l
lstore 5
25: iload 7
istore 8
26: goto 30
27: StackMap locals: int int
StackMap stack:
lload 3
iload 10
i2l
lmul
lstore 3
28: lload 5
iload 11
i2l
lmul
lstore 5
29: iload 8
iload 7
iadd
istore 8
end local 11 end local 10 30: StackMap locals:
StackMap stack:
iinc 9 1
StackMap locals:
StackMap stack:
31: iload 9
iload 1
if_icmplt 16
end local 9 32: aload 2
33: lload 3
invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.multiply:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
34: lload 5
invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.divide:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
35: areturn
end local 8 end local 7 end local 5 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 36 0 n I
0 36 1 k I
10 36 2 accum Ljava/math/BigInteger;
11 36 3 numeratorAccum J
12 36 5 denominatorAccum J
13 36 7 bits I
14 36 8 numeratorBits I
15 32 9 i I
17 30 10 p I
18 30 11 q I
MethodParameters:
Name Flags
n
k
static boolean fitsInLong(java.math.BigInteger);
descriptor: (Ljava/math/BigInteger;)Z
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual java.math.BigInteger.bitLength:()I
bipush 63
if_icmpgt 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 x Ljava/math/BigInteger;
RuntimeInvisibleAnnotations:
com.google.common.annotations.GwtIncompatible()
MethodParameters:
Name Flags
x
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/google/common/math/BigIntegerMath;
static int[] $SWITCH_TABLE$java$math$RoundingMode();
descriptor: ()[I
flags: (0x1008) ACC_STATIC, ACC_SYNTHETIC
Code:
stack=3, locals=1, args_size=0
0: getstatic com.google.common.math.BigIntegerMath.$SWITCH_TABLE$java$math$RoundingMode:[I
dup
ifnull 1
areturn
StackMap locals:
StackMap stack: int[]
1: pop
invokestatic java.math.RoundingMode.values:()[Ljava/math/RoundingMode;
arraylength
newarray 10
astore 0
2: aload 0
getstatic java.math.RoundingMode.CEILING:Ljava/math/RoundingMode;
invokevirtual java.math.RoundingMode.ordinal:()I
iconst_3
iastore
3: goto 5
StackMap locals: int[]
StackMap stack: java.lang.NoSuchFieldError
4: pop
StackMap locals:
StackMap stack:
5: aload 0
getstatic java.math.RoundingMode.DOWN:Ljava/math/RoundingMode;
invokevirtual java.math.RoundingMode.ordinal:()I
iconst_2
iastore
6: goto 8
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
7: pop
StackMap locals:
StackMap stack:
8: aload 0
getstatic java.math.RoundingMode.FLOOR:Ljava/math/RoundingMode;
invokevirtual java.math.RoundingMode.ordinal:()I
iconst_4
iastore
9: goto 11
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
10: pop
StackMap locals:
StackMap stack:
11: aload 0
getstatic java.math.RoundingMode.HALF_DOWN:Ljava/math/RoundingMode;
invokevirtual java.math.RoundingMode.ordinal:()I
bipush 6
iastore
12: goto 14
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
13: pop
StackMap locals:
StackMap stack:
14: aload 0
getstatic java.math.RoundingMode.HALF_EVEN:Ljava/math/RoundingMode;
invokevirtual java.math.RoundingMode.ordinal:()I
bipush 7
iastore
15: goto 17
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
16: pop
StackMap locals:
StackMap stack:
17: aload 0
getstatic java.math.RoundingMode.HALF_UP:Ljava/math/RoundingMode;
invokevirtual java.math.RoundingMode.ordinal:()I
iconst_5
iastore
18: goto 20
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
19: pop
StackMap locals:
StackMap stack:
20: aload 0
getstatic java.math.RoundingMode.UNNECESSARY:Ljava/math/RoundingMode;
invokevirtual java.math.RoundingMode.ordinal:()I
bipush 8
iastore
21: goto 23
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
22: pop
StackMap locals:
StackMap stack:
23: aload 0
getstatic java.math.RoundingMode.UP:Ljava/math/RoundingMode;
invokevirtual java.math.RoundingMode.ordinal:()I
iconst_1
iastore
24: goto 26
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
25: pop
StackMap locals:
StackMap stack:
26: aload 0
dup
putstatic com.google.common.math.BigIntegerMath.$SWITCH_TABLE$java$math$RoundingMode:[I
areturn
LocalVariableTable:
Start End Slot Name Signature
Exception table:
from to target type
2 3 4 Class java.lang.NoSuchFieldError
5 6 7 Class java.lang.NoSuchFieldError
8 9 10 Class java.lang.NoSuchFieldError
11 12 13 Class java.lang.NoSuchFieldError
14 15 16 Class java.lang.NoSuchFieldError
17 18 19 Class java.lang.NoSuchFieldError
20 21 22 Class java.lang.NoSuchFieldError
23 24 25 Class java.lang.NoSuchFieldError
}
SourceFile: "BigIntegerMath.java"
RuntimeInvisibleAnnotations:
com.google.common.annotations.GwtCompatible(emulated = true)