![JAR search and dependency download from the Maven repository](/logo.png)
com.google.common.math.BigIntegerMath.class Maven / Gradle / Ivy
???? 4e ? ? ?
?
? ? ?
? ?
?
?
? g ?
? ? S ?
? ?
?
? ? ? ?
?
?
? ?
?
?
?
? ? ? ? ?
?
?
?
? ?
? ?
?
?
? ?
? ?
? ?
?
* ?
? ? ? ?
? ? U ?
U ? ?
2 ?
2 ?
2 ?
? ?
<
:
?
<
?
? ?
?
R ?
@$
?@ InnerClasses BigIntegerToDoubleRounder SQRT2_PRECOMPUTE_THRESHOLD I
ConstantValue RuntimeInvisibleAnnotations 1Lcom/google/common/annotations/VisibleForTesting; SQRT2_PRECOMPUTED_BITS Ljava/math/BigInteger; LN_10 D LN_2 ceilingPowerOfTwo .(Ljava/math/BigInteger;)Ljava/math/BigInteger; Code LineNumberTable LocalVariableTable x MethodParameters floorPowerOfTwo isPowerOfTwo (Ljava/math/BigInteger;)Z
StackMapTable log2 1(Ljava/math/BigInteger;Ljava/math/RoundingMode;)I halfPower x2
logX2Floor mode Ljava/math/RoundingMode; logFloor log10 nextPow nextCmp halfPowerSquared approxLog10 approxPow approxCmp floorLog floorPow floorCmp /Lcom/google/common/annotations/GwtIncompatible; sqrt F(Ljava/math/BigInteger;Ljava/math/RoundingMode;)Ljava/math/BigInteger; sqrtFloorInt sqrtFloorIsExact Z
halfSquare sqrtFloor sqrt0 shift sqrt1 sqrtApproxWithDoubles
roundToDouble 1(Ljava/math/BigInteger;Ljava/math/RoundingMode;)D divide \(Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/RoundingMode;)Ljava/math/BigInteger; p q pDec Ljava/math/BigDecimal; qDec factorial (I)Ljava/math/BigInteger; tz
normalizedNum J normalizedBits num n
approxSize bignums Ljava/util/ArrayList; startingNumber product productBits bits nextPowerOfTwo LocalVariableTypeTable -Ljava/util/ArrayList; listProduct ((Ljava/util/List;)Ljava/math/BigInteger; nums Ljava/util/List; (Ljava/util/List; Signature @(Ljava/util/List;)Ljava/math/BigInteger; *(Ljava/util/List;II)Ljava/math/BigInteger; m start end B(Ljava/util/List;II)Ljava/math/BigInteger; binomial (II)Ljava/math/BigInteger; i k accum numeratorAccum denominatorAccum
numeratorBits
fitsInLong ()V this 'Lcom/google/common/math/BigIntegerMath;
SourceFile BigIntegerMath.java RuntimeVisibleAnnotations 8Lcom/google/common/math/ElementTypesAreNonnullByDefault; -Lcom/google/common/annotations/GwtCompatible; emulated ^ s m n ? s !"#$%$&$ java/math/BigInteger'()*+,$ j k-. %com/google/common/math/BigIntegerMath ] ^/ ?012 ? java/lang/AssertionError ? ? ? k345 u6 a ` _ `7 ^ ? c8 c9:;) ?<=> ? c?$@ ^A c java/lang/Double ? c "com/google/common/math/DoubleUtilsB ?CDE ?FG sHIJKL ?M java/math/BigDecimal ?N ?OPQ;RSTU mV java/lang/Long ?W java/util/ArrayList ?XYZ m6A: ? ?[\$ ? ?]^ k (%s) > n (%s)_`a+ ?b A16a09e667f3bcc908b2fb1366ea957d3e3adec17512775099da2f590b0667322a ?cdF java/lang/Object 'com/google/common/math/BigIntegerMath$1 ?com/google/common/math/BigIntegerMath$BigIntegerToDoubleRounder ZERO java/math/RoundingMode CEILING setBit FLOOR $com/google/common/base/Preconditions checkNotNull &(Ljava/lang/Object;)Ljava/lang/Object; signum ()I getLowestSetBit bitLength (com/google/common/math/MathPreconditions
checkPositive @(Ljava/lang/String;Ljava/math/BigInteger;)Ljava/math/BigInteger; !$SwitchMap$java$math$RoundingMode [I ordinal checkRoundingUnnecessary (Z)V
shiftRight compareTo (Ljava/math/BigInteger;)I pow longValue ()J com/google/common/math/LongMath (JLjava/math/RoundingMode;)I TEN multiply equals (Ljava/lang/Object;)Z checkNonNegative (JLjava/math/RoundingMode;)J valueOf (J)Ljava/math/BigInteger; intValue ONE add shiftLeft bigToDouble (Ljava/math/BigInteger;)D java/lang/Math (D)D HALF_EVEN !com/google/common/math/DoubleMath roundToBigInteger 1(DLjava/math/RoundingMode;)Ljava/math/BigInteger; INSTANCE ALcom/google/common/math/BigIntegerMath$BigIntegerToDoubleRounder; -(Ljava/lang/Number;Ljava/math/RoundingMode;)D (Ljava/math/BigInteger;)V G(Ljava/math/BigDecimal;ILjava/math/RoundingMode;)Ljava/math/BigDecimal; toBigIntegerExact ()Ljava/math/BigInteger; (Ljava/lang/String;I)I
factorials [J com/google/common/math/IntMath (ILjava/math/RoundingMode;)I (IILjava/math/RoundingMode;)I (I)V numberOfTrailingZeros (J)I java/util/List size get (I)Ljava/lang/Object;
checkArgument (ZLjava/lang/String;II)V biggestBinomials (II)J (Ljava/lang/String;I)V log 1 R W X Y Z [ \ ] ^ [ \ _ ` a ` b c d 8 ? *? ? ? ? e : f g ^ h g i c d 8 ? *? ? ? ? e E f g ^ h g j k d X *? W*? ? *? *? d? ? ? e
J K f g ^ l @ h g m n d l ?
*? ? ? W*? d=?
+? .? ? 0 7 7 9 9 H H H*? ? ?*? ? ? `? ? ? d? N*-? ? ?`?*? N-? d6h`? ? `?? Y? ? e B X
Y Z L \ S _ U c d h k i s j w k l ? n ? u ? v ? w ? z f > w o ^ ? p ^ ? q X ? g ^ ? r s ? t X l ! ? L
B ? ? ? B? h g r u n d g
*? W*? ? *? +? ?*? ? ?? k? o?=? ? N-*? 6? ??-? ? N-*? 6??? 7? -? :*? 6? !?N6? -? :*? 6???6-:6?
+? .? { / <