public final class org.apache.commons.math.util.ArithmeticUtils extends java.lang.Object
{
static final long[] FACTORIALS;
static final java.util.concurrent.atomic.AtomicReference STIRLING_S2;
private void <init>()
{
org.apache.commons.math.util.ArithmeticUtils v;
v := @this: org.apache.commons.math.util.ArithmeticUtils;
specialinvoke v.<java.lang.Object: void <init>()>();
return;
}
public static int addAndCheck(int, int) throws org.apache.commons.math.exception.MathArithmeticException
{
java.lang.Object[] v;
org.apache.commons.math.exception.util.LocalizedFormats v;
long v;
java.lang.Integer v, v;
org.apache.commons.math.exception.MathArithmeticException v;
byte v, v;
int v, v;
v := @parameter: int;
v := @parameter: int;
v = v + v;
v = v cmp -2147483648L;
if v < 0 goto label;
v = v cmp 2147483647L;
if v <= 0 goto label;
label:
v = new org.apache.commons.math.exception.MathArithmeticException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats OVERFLOW_IN_ADDITION>;
v = newarray (java.lang.Object)[2];
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v[0] = v;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v[1] = v;
specialinvoke v.<org.apache.commons.math.exception.MathArithmeticException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Object[])>(v, v);
throw v;
label:
return v;
}
public static long addAndCheck(long, long) throws org.apache.commons.math.exception.MathArithmeticException
{
org.apache.commons.math.exception.util.LocalizedFormats v;
long v, v, v;
v := @parameter: long;
v := @parameter: long;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats OVERFLOW_IN_ADDITION>;
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: long addAndCheck(long,long,org.apache.commons.math.exception.util.Localizable)>(v, v, v);
return v;
}
public static long binomialCoefficient(int, int) throws org.apache.commons.math.exception.NotPositiveException, org.apache.commons.math.exception.NumberIsTooLargeException, org.apache.commons.math.exception.MathArithmeticException
{
long v, v, v, v, v, v, v, v, v;
int v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
v := @parameter: int;
v := @parameter: int;
staticinvoke <org.apache.commons.math.util.ArithmeticUtils: void checkBinomial(int,int)>(v, v);
if v == v goto label;
if v != 0 goto label;
label:
return 1L;
label:
if v == 1 goto label;
v = v - 1;
if v != v goto label;
label:
return v;
label:
v = v / 2;
if v <= v goto label;
v = v - v;
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: long binomialCoefficient(int,int)>(v, v);
return v;
label:
v = 1L;
if v > 61 goto label;
v = v - v;
v = v + 1;
v = 1;
label:
if v > v goto label;
v = v * v;
v = v / v;
v = v + 1;
v = v + 1;
goto label;
label:
if v > 66 goto label;
v = v - v;
v = v + 1;
v = 1;
label:
if v > v goto label;
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: int gcd(int,int)>(v, v);
v = v / v;
v = v / v;
v = v / v;
v = v * v;
v = v + 1;
v = v + 1;
goto label;
label:
v = v - v;
v = v + 1;
v = 1;
label:
if v > v goto label;
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: int gcd(int,int)>(v, v);
v = v / v;
v = v / v;
v = v / v;
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: long mulAndCheck(long,long)>(v, v);
v = v + 1;
v = v + 1;
goto label;
label:
return v;
}
public static double binomialCoefficientDouble(int, int) throws org.apache.commons.math.exception.NotPositiveException, org.apache.commons.math.exception.NumberIsTooLargeException, org.apache.commons.math.exception.MathArithmeticException
{
long v;
int v, v, v, v, v, v, v, v;
double v, v, v, v, v;
v := @parameter: int;
v := @parameter: int;
staticinvoke <org.apache.commons.math.util.ArithmeticUtils: void checkBinomial(int,int)>(v, v);
if v == v goto label;
if v != 0 goto label;
label:
return 1.0;
label:
if v == 1 goto label;
v = v - 1;
if v != v goto label;
label:
return v;
label:
v = v / 2;
if v <= v goto label;
v = v - v;
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: double binomialCoefficientDouble(int,int)>(v, v);
return v;
label:
if v >= 67 goto label;
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: long binomialCoefficient(int,int)>(v, v);
return v;
label:
v = 1.0;
v = 1;
label:
if v > v goto label;
v = v - v;
v = v + v;
v = v / v;
v = v * v;
v = v + 1;
goto label;
label:
v = v + 0.5;
v = staticinvoke <org.apache.commons.math.util.FastMath: double floor(double)>(v);
return v;
}
public static double binomialCoefficientLog(int, int) throws org.apache.commons.math.exception.NotPositiveException, org.apache.commons.math.exception.NumberIsTooLargeException, org.apache.commons.math.exception.MathArithmeticException
{
long v;
int v, v, v, v, v, v, v, v;
double v, v, v, v, v, v, v, v;
v := @parameter: int;
v := @parameter: int;
staticinvoke <org.apache.commons.math.util.ArithmeticUtils: void checkBinomial(int,int)>(v, v);
if v == v goto label;
if v != 0 goto label;
label:
return 0.0;
label:
if v == 1 goto label;
v = v - 1;
if v != v goto label;
label:
v = staticinvoke <org.apache.commons.math.util.FastMath: double log(double)>(v);
return v;
label:
if v >= 67 goto label;
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: long binomialCoefficient(int,int)>(v, v);
v = staticinvoke <org.apache.commons.math.util.FastMath: double log(double)>(v);
return v;
label:
if v >= 1030 goto label;
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: double binomialCoefficientDouble(int,int)>(v, v);
v = staticinvoke <org.apache.commons.math.util.FastMath: double log(double)>(v);
return v;
label:
v = v / 2;
if v <= v goto label;
v = v - v;
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: double binomialCoefficientLog(int,int)>(v, v);
return v;
label:
v = 0.0;
v = v - v;
v = v + 1;
label:
if v > v goto label;
v = staticinvoke <org.apache.commons.math.util.FastMath: double log(double)>(v);
v = v + v;
v = v + 1;
goto label;
label:
v = 2;
label:
if v > v goto label;
v = staticinvoke <org.apache.commons.math.util.FastMath: double log(double)>(v);
v = v - v;
v = v + 1;
goto label;
label:
return v;
}
public static long factorial(int) throws org.apache.commons.math.exception.NotPositiveException, org.apache.commons.math.exception.MathArithmeticException
{
long[] v;
org.apache.commons.math.exception.NotPositiveException v;
org.apache.commons.math.exception.util.LocalizedFormats v;
int v;
long v;
java.lang.Integer v;
org.apache.commons.math.exception.MathArithmeticException v;
v := @parameter: int;
if v >= 0 goto label;
v = new org.apache.commons.math.exception.NotPositiveException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats FACTORIAL_NEGATIVE_PARAMETER>;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
specialinvoke v.<org.apache.commons.math.exception.NotPositiveException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Number)>(v, v);
throw v;
label:
if v <= 20 goto label;
v = new org.apache.commons.math.exception.MathArithmeticException;
specialinvoke v.<org.apache.commons.math.exception.MathArithmeticException: void <init>()>();
throw v;
label:
v = <org.apache.commons.math.util.ArithmeticUtils: long[] FACTORIALS>;
v = v[v];
return v;
}
public static double factorialDouble(int) throws org.apache.commons.math.exception.NotPositiveException
{
org.apache.commons.math.exception.util.LocalizedFormats v;
long v;
java.lang.Integer v;
long[] v;
org.apache.commons.math.exception.NotPositiveException v;
int v;
double v, v, v, v;
v := @parameter: int;
if v >= 0 goto label;
v = new org.apache.commons.math.exception.NotPositiveException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats FACTORIAL_NEGATIVE_PARAMETER>;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
specialinvoke v.<org.apache.commons.math.exception.NotPositiveException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Number)>(v, v);
throw v;
label:
if v >= 21 goto label;
v = <org.apache.commons.math.util.ArithmeticUtils: long[] FACTORIALS>;
v = v[v];
return v;
label:
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: double factorialLog(int)>(v);
v = staticinvoke <org.apache.commons.math.util.FastMath: double exp(double)>(v);
v = v + 0.5;
v = staticinvoke <org.apache.commons.math.util.FastMath: double floor(double)>(v);
return v;
}
public static double factorialLog(int) throws org.apache.commons.math.exception.NotPositiveException
{
org.apache.commons.math.exception.util.LocalizedFormats v;
long v;
java.lang.Integer v;
long[] v;
org.apache.commons.math.exception.NotPositiveException v;
int v, v;
double v, v, v;
v := @parameter: int;
if v >= 0 goto label;
v = new org.apache.commons.math.exception.NotPositiveException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats FACTORIAL_NEGATIVE_PARAMETER>;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
specialinvoke v.<org.apache.commons.math.exception.NotPositiveException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Number)>(v, v);
throw v;
label:
if v >= 21 goto label;
v = <org.apache.commons.math.util.ArithmeticUtils: long[] FACTORIALS>;
v = v[v];
v = staticinvoke <org.apache.commons.math.util.FastMath: double log(double)>(v);
return v;
label:
v = 0.0;
v = 2;
label:
if v > v goto label;
v = staticinvoke <org.apache.commons.math.util.FastMath: double log(double)>(v);
v = v + v;
v = v + 1;
goto label;
label:
return v;
}
public static int gcd(int, int) throws org.apache.commons.math.exception.MathArithmeticException
{
java.lang.Object[] v, v, v;
long v, v;
java.lang.Integer v, v, v, v, v, v;
org.apache.commons.math.exception.MathArithmeticException v, v, v;
byte v, v, v;
int v, v, v, v, v, v, v;
boolean v;
org.apache.commons.math.exception.util.LocalizedFormats v, v, v;
v := @parameter: int;
v := @parameter: int;
v = v;
v = v;
if v == 0 goto label;
if v != 0 goto label;
label:
if v == -2147483648 goto label;
if v != -2147483648 goto label;
label:
v = new org.apache.commons.math.exception.MathArithmeticException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats GCD_OVERFLOW_32_BITS>;
v = newarray (java.lang.Object)[2];
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v[0] = v;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v[1] = v;
specialinvoke v.<org.apache.commons.math.exception.MathArithmeticException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Object[])>(v, v);
throw v;
label:
v = v + v;
v = staticinvoke <org.apache.commons.math.util.FastMath: int abs(int)>(v);
return v;
label:
v = 0;
if v >= 0 goto label;
if -2147483648 != v goto label;
v = 1;
goto label;
label:
v = neg v;
label:
v = neg v;
label:
if v >= 0 goto label;
if -2147483648 != v goto label;
v = 1;
goto label;
label:
v = neg v;
label:
v = neg v;
label:
if v == 0 goto label;
v = v cmp v;
if v != 0 goto label;
v = new org.apache.commons.math.exception.MathArithmeticException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats GCD_OVERFLOW_32_BITS>;
v = newarray (java.lang.Object)[2];
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v[0] = v;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v[1] = v;
specialinvoke v.<org.apache.commons.math.exception.MathArithmeticException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Object[])>(v, v);
throw v;
label:
v = v % v;
v = v cmp 0L;
if v != 0 goto label;
v = v cmp 2147483647L;
if v <= 0 goto label;
v = new org.apache.commons.math.exception.MathArithmeticException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats GCD_OVERFLOW_32_BITS>;
v = newarray (java.lang.Object)[2];
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v[0] = v;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v[1] = v;
specialinvoke v.<org.apache.commons.math.exception.MathArithmeticException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Object[])>(v, v);
throw v;
label:
return v;
label:
v = v % v;
label:
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: int gcdPositive(int,int)>(v, v);
return v;
}
private static int gcdPositive(int, int)
{
int v, v, v, v, v, v, v, v, v, v, v;
v := @parameter: int;
v := @parameter: int;
if v != 0 goto label;
return v;
label:
if v != 0 goto label;
return v;
label:
v = staticinvoke <java.lang.Integer: int numberOfTrailingZeros(int)>(v);
v = v >> v;
v = staticinvoke <java.lang.Integer: int numberOfTrailingZeros(int)>(v);
v = v >> v;
v = staticinvoke <java.lang.Math: int min(int,int)>(v, v);
label:
if v == v goto label;
v = v - v;
v = staticinvoke <java.lang.Math: int min(int,int)>(v, v);
v = staticinvoke <java.lang.Math: int abs(int)>(v);
v = staticinvoke <java.lang.Integer: int numberOfTrailingZeros(int)>(v);
v = v >> v;
goto label;
label:
v = v << v;
return v;
}
public static long gcd(long, long) throws org.apache.commons.math.exception.MathArithmeticException
{
org.apache.commons.math.exception.MathArithmeticException v, v;
byte v, v, v, v, v, v, v, v, v, v, v, v;
java.lang.Long v, v, v, v;
java.lang.Object[] v, v;
long v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
int v;
org.apache.commons.math.exception.util.LocalizedFormats v, v;
v := @parameter: long;
v := @parameter: long;
v = v;
v = v;
v = v cmp 0L;
if v == 0 goto label;
v = v cmp 0L;
if v != 0 goto label;
label:
v = v cmp -9223372036854775808L;
if v == 0 goto label;
v = v cmp -9223372036854775808L;
if v != 0 goto label;
label:
v = new org.apache.commons.math.exception.MathArithmeticException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats GCD_OVERFLOW_64_BITS>;
v = newarray (java.lang.Object)[2];
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v[0] = v;
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v[1] = v;
specialinvoke v.<org.apache.commons.math.exception.MathArithmeticException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Object[])>(v, v);
throw v;
label:
v = staticinvoke <org.apache.commons.math.util.FastMath: long abs(long)>(v);
v = staticinvoke <org.apache.commons.math.util.FastMath: long abs(long)>(v);
v = v + v;
return v;
label:
v = v cmp 0L;
if v <= 0 goto label;
v = neg v;
label:
v = v cmp 0L;
if v <= 0 goto label;
v = neg v;
label:
v = 0;
label:
v = v & 1L;
v = v cmp 0L;
if v != 0 goto label;
v = v & 1L;
v = v cmp 0L;
if v != 0 goto label;
if v >= 63 goto label;
v = v / 2L;
v = v / 2L;
v = v + 1;
goto label;
label:
if v != 63 goto label;
v = new org.apache.commons.math.exception.MathArithmeticException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats GCD_OVERFLOW_64_BITS>;
v = newarray (java.lang.Object)[2];
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v[0] = v;
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v[1] = v;
specialinvoke v.<org.apache.commons.math.exception.MathArithmeticException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Object[])>(v, v);
throw v;
label:
v = v & 1L;
v = v cmp 1L;
if v != 0 goto label;
v = v;
goto label;
label:
v = v / 2L;
v = neg v;
label:
v = v;
label:
v = v & 1L;
v = v cmp 0L;
if v != 0 goto label;
v = v / 2L;
goto label;
label:
v = v cmp 0L;
if v <= 0 goto label;
v = neg v;
goto label;
label:
v = v;
label:
v = v - v;
v = v / 2L;
v = v cmp 0L;
if v != 0 goto label;
v = neg v;
v = 1L << v;
v = v * v;
return v;
}
public static int lcm(int, int) throws org.apache.commons.math.exception.MathArithmeticException
{
java.lang.Object[] v;
org.apache.commons.math.exception.util.LocalizedFormats v;
java.lang.Integer v, v;
org.apache.commons.math.exception.MathArithmeticException v;
int v, v, v, v, v, v;
v := @parameter: int;
v := @parameter: int;
if v == 0 goto label;
if v != 0 goto label;
label:
return 0;
label:
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: int gcd(int,int)>(v, v);
v = v / v;
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: int mulAndCheck(int,int)>(v, v);
v = staticinvoke <org.apache.commons.math.util.FastMath: int abs(int)>(v);
if v != -2147483648 goto label;
v = new org.apache.commons.math.exception.MathArithmeticException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats LCM_OVERFLOW_32_BITS>;
v = newarray (java.lang.Object)[2];
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v[0] = v;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v[1] = v;
specialinvoke v.<org.apache.commons.math.exception.MathArithmeticException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Object[])>(v, v);
throw v;
label:
return v;
}
public static long lcm(long, long) throws org.apache.commons.math.exception.MathArithmeticException
{
java.lang.Object[] v;
org.apache.commons.math.exception.util.LocalizedFormats v;
long v, v, v, v, v, v;
org.apache.commons.math.exception.MathArithmeticException v;
byte v, v, v;
java.lang.Long v, v;
v := @parameter: long;
v := @parameter: long;
v = v cmp 0L;
if v == 0 goto label;
v = v cmp 0L;
if v != 0 goto label;
label:
return 0L;
label:
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: long gcd(long,long)>(v, v);
v = v / v;
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: long mulAndCheck(long,long)>(v, v);
v = staticinvoke <org.apache.commons.math.util.FastMath: long abs(long)>(v);
v = v cmp -9223372036854775808L;
if v != 0 goto label;
v = new org.apache.commons.math.exception.MathArithmeticException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats LCM_OVERFLOW_64_BITS>;
v = newarray (java.lang.Object)[2];
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v[0] = v;
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v[1] = v;
specialinvoke v.<org.apache.commons.math.exception.MathArithmeticException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Object[])>(v, v);
throw v;
label:
return v;
}
public static int mulAndCheck(int, int) throws org.apache.commons.math.exception.MathArithmeticException
{
byte v, v;
int v, v;
long v;
org.apache.commons.math.exception.MathArithmeticException v;
v := @parameter: int;
v := @parameter: int;
v = v * v;
v = v cmp -2147483648L;
if v < 0 goto label;
v = v cmp 2147483647L;
if v <= 0 goto label;
label:
v = new org.apache.commons.math.exception.MathArithmeticException;
specialinvoke v.<org.apache.commons.math.exception.MathArithmeticException: void <init>()>();
throw v;
label:
return v;
}
public static long mulAndCheck(long, long) throws org.apache.commons.math.exception.MathArithmeticException
{
long v, v, v, v, v, v;
org.apache.commons.math.exception.MathArithmeticException v, v, v;
byte v, v, v, v, v, v, v, v;
v := @parameter: long;
v := @parameter: long;
v = v cmp v;
if v <= 0 goto label;
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: long mulAndCheck(long,long)>(v, v);
goto label;
label:
v = v cmp 0L;
if v >= 0 goto label;
v = v cmp 0L;
if v >= 0 goto label;
v = 9223372036854775807L / v;
v = v cmp v;
if v < 0 goto label;
v = v * v;
goto label;
label:
v = new org.apache.commons.math.exception.MathArithmeticException;
specialinvoke v.<org.apache.commons.math.exception.MathArithmeticException: void <init>()>();
throw v;
label:
v = v cmp 0L;
if v <= 0 goto label;
v = -9223372036854775808L / v;
v = v cmp v;
if v > 0 goto label;
v = v * v;
goto label;
label:
v = new org.apache.commons.math.exception.MathArithmeticException;
specialinvoke v.<org.apache.commons.math.exception.MathArithmeticException: void <init>()>();
throw v;
label:
v = 0L;
goto label;
label:
v = v cmp 0L;
if v <= 0 goto label;
v = 9223372036854775807L / v;
v = v cmp v;
if v > 0 goto label;
v = v * v;
goto label;
label:
v = new org.apache.commons.math.exception.MathArithmeticException;
specialinvoke v.<org.apache.commons.math.exception.MathArithmeticException: void <init>()>();
throw v;
label:
v = 0L;
label:
return v;
}
public static int subAndCheck(int, int) throws org.apache.commons.math.exception.MathArithmeticException
{
java.lang.Object[] v;
org.apache.commons.math.exception.util.LocalizedFormats v;
long v;
java.lang.Integer v, v;
org.apache.commons.math.exception.MathArithmeticException v;
byte v, v;
int v, v;
v := @parameter: int;
v := @parameter: int;
v = v - v;
v = v cmp -2147483648L;
if v < 0 goto label;
v = v cmp 2147483647L;
if v <= 0 goto label;
label:
v = new org.apache.commons.math.exception.MathArithmeticException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats OVERFLOW_IN_SUBTRACTION>;
v = newarray (java.lang.Object)[2];
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v[0] = v;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v[1] = v;
specialinvoke v.<org.apache.commons.math.exception.MathArithmeticException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Object[])>(v, v);
throw v;
label:
return v;
}
public static long subAndCheck(long, long) throws org.apache.commons.math.exception.MathArithmeticException
{
java.lang.Object[] v;
org.apache.commons.math.exception.util.LocalizedFormats v, v;
long v, v, v, v, v;
org.apache.commons.math.exception.MathArithmeticException v;
byte v, v;
java.lang.Long v, v;
v := @parameter: long;
v := @parameter: long;
v = v cmp -9223372036854775808L;
if v != 0 goto label;
v = v cmp 0L;
if v >= 0 goto label;
v = v - v;
goto label;
label:
v = new org.apache.commons.math.exception.MathArithmeticException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats OVERFLOW_IN_ADDITION>;
v = newarray (java.lang.Object)[2];
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v[0] = v;
v = neg v;
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v[1] = v;
specialinvoke v.<org.apache.commons.math.exception.MathArithmeticException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Object[])>(v, v);
throw v;
label:
v = neg v;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats OVERFLOW_IN_ADDITION>;
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: long addAndCheck(long,long,org.apache.commons.math.exception.util.Localizable)>(v, v, v);
label:
return v;
}
public static int pow(int, int) throws org.apache.commons.math.exception.NotPositiveException
{
org.apache.commons.math.exception.util.LocalizedFormats v;
java.lang.Integer v;
org.apache.commons.math.exception.NotPositiveException v;
int v, v, v, v, v;
v := @parameter: int;
v := @parameter: int;
if v >= 0 goto label;
v = new org.apache.commons.math.exception.NotPositiveException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats EXPONENT>;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
specialinvoke v.<org.apache.commons.math.exception.NotPositiveException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Number)>(v, v);
throw v;
label:
v = 1;
v = v;
label:
if v == 0 goto label;
v = v & 1;
if v == 0 goto label;
v = v * v;
label:
v = v * v;
v = v >> 1;
goto label;
label:
return v;
}
public static int pow(int, long) throws org.apache.commons.math.exception.NotPositiveException
{
org.apache.commons.math.exception.util.LocalizedFormats v;
long v, v;
byte v, v, v;
org.apache.commons.math.exception.NotPositiveException v;
java.lang.Long v;
int v, v, v;
v := @parameter: int;
v := @parameter: long;
v = v cmp 0L;
if v >= 0 goto label;
v = new org.apache.commons.math.exception.NotPositiveException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats EXPONENT>;
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
specialinvoke v.<org.apache.commons.math.exception.NotPositiveException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Number)>(v, v);
throw v;
label:
v = 1;
v = v;
label:
v = v cmp 0L;
if v == 0 goto label;
v = v & 1L;
v = v cmp 0L;
if v == 0 goto label;
v = v * v;
label:
v = v * v;
v = v >> 1;
goto label;
label:
return v;
}
public static long pow(long, int) throws org.apache.commons.math.exception.NotPositiveException
{
org.apache.commons.math.exception.util.LocalizedFormats v;
long v, v, v;
java.lang.Integer v;
org.apache.commons.math.exception.NotPositiveException v;
int v, v;
v := @parameter: long;
v := @parameter: int;
if v >= 0 goto label;
v = new org.apache.commons.math.exception.NotPositiveException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats EXPONENT>;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
specialinvoke v.<org.apache.commons.math.exception.NotPositiveException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Number)>(v, v);
throw v;
label:
v = 1L;
v = v;
label:
if v == 0 goto label;
v = v & 1;
if v == 0 goto label;
v = v * v;
label:
v = v * v;
v = v >> 1;
goto label;
label:
return v;
}
public static long pow(long, long) throws org.apache.commons.math.exception.NotPositiveException
{
org.apache.commons.math.exception.util.LocalizedFormats v;
long v, v, v, v, v;
byte v, v, v;
org.apache.commons.math.exception.NotPositiveException v;
java.lang.Long v;
v := @parameter: long;
v := @parameter: long;
v = v cmp 0L;
if v >= 0 goto label;
v = new org.apache.commons.math.exception.NotPositiveException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats EXPONENT>;
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
specialinvoke v.<org.apache.commons.math.exception.NotPositiveException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Number)>(v, v);
throw v;
label:
v = 1L;
v = v;
label:
v = v cmp 0L;
if v == 0 goto label;
v = v & 1L;
v = v cmp 0L;
if v == 0 goto label;
v = v * v;
label:
v = v * v;
v = v >> 1;
goto label;
label:
return v;
}
public static java.math.BigInteger pow(java.math.BigInteger, int) throws org.apache.commons.math.exception.NotPositiveException
{
org.apache.commons.math.exception.NotPositiveException v;
org.apache.commons.math.exception.util.LocalizedFormats v;
int v;
java.math.BigInteger v, v;
java.lang.Integer v;
v := @parameter: java.math.BigInteger;
v := @parameter: int;
if v >= 0 goto label;
v = new org.apache.commons.math.exception.NotPositiveException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats EXPONENT>;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
specialinvoke v.<org.apache.commons.math.exception.NotPositiveException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Number)>(v, v);
throw v;
label:
v = virtualinvoke v.<java.math.BigInteger: java.math.BigInteger pow(int)>(v);
return v;
}
public static java.math.BigInteger pow(java.math.BigInteger, long) throws org.apache.commons.math.exception.NotPositiveException
{
org.apache.commons.math.exception.util.LocalizedFormats v;
long v, v;
byte v, v, v;
org.apache.commons.math.exception.NotPositiveException v;
java.lang.Long v;
java.math.BigInteger v, v, v;
v := @parameter: java.math.BigInteger;
v := @parameter: long;
v = v cmp 0L;
if v >= 0 goto label;
v = new org.apache.commons.math.exception.NotPositiveException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats EXPONENT>;
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
specialinvoke v.<org.apache.commons.math.exception.NotPositiveException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Number)>(v, v);
throw v;
label:
v = <java.math.BigInteger: java.math.BigInteger ONE>;
v = v;
label:
v = v cmp 0L;
if v == 0 goto label;
v = v & 1L;
v = v cmp 0L;
if v == 0 goto label;
v = virtualinvoke v.<java.math.BigInteger: java.math.BigInteger multiply(java.math.BigInteger)>(v);
label:
v = virtualinvoke v.<java.math.BigInteger: java.math.BigInteger multiply(java.math.BigInteger)>(v);
v = v >> 1;
goto label;
label:
return v;
}
public static java.math.BigInteger pow(java.math.BigInteger, java.math.BigInteger) throws org.apache.commons.math.exception.NotPositiveException
{
org.apache.commons.math.exception.util.LocalizedFormats v;
org.apache.commons.math.exception.NotPositiveException v;
int v;
java.math.BigInteger v, v, v, v, v, v;
boolean v, v;
v := @parameter: java.math.BigInteger;
v := @parameter: java.math.BigInteger;
v = <java.math.BigInteger: java.math.BigInteger ZERO>;
v = virtualinvoke v.<java.math.BigInteger: int compareTo(java.math.BigInteger)>(v);
if v >= 0 goto label;
v = new org.apache.commons.math.exception.NotPositiveException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats EXPONENT>;
specialinvoke v.<org.apache.commons.math.exception.NotPositiveException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Number)>(v, v);
throw v;
label:
v = <java.math.BigInteger: java.math.BigInteger ONE>;
v = v;
label:
v = <java.math.BigInteger: java.math.BigInteger ZERO>;
v = virtualinvoke v.<java.math.BigInteger: boolean equals(java.lang.Object)>(v);
if v != 0 goto label;
v = virtualinvoke v.<java.math.BigInteger: boolean testBit(int)>(0);
if v == 0 goto label;
v = virtualinvoke v.<java.math.BigInteger: java.math.BigInteger multiply(java.math.BigInteger)>(v);
label:
v = virtualinvoke v.<java.math.BigInteger: java.math.BigInteger multiply(java.math.BigInteger)>(v);
v = virtualinvoke v.<java.math.BigInteger: java.math.BigInteger shiftRight(int)>(1);
goto label;
label:
return v;
}
public static long stirlingS2(int, int) throws org.apache.commons.math.exception.NotPositiveException, org.apache.commons.math.exception.NumberIsTooLargeException, org.apache.commons.math.exception.MathArithmeticException
{
java.lang.Integer v, v, v, v, v, v;
org.apache.commons.math.exception.MathArithmeticException v;
byte v;
org.apache.commons.math.exception.NotPositiveException v;
org.apache.commons.math.exception.NumberIsTooLargeException v;
java.lang.Object[] v;
long v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
java.util.concurrent.atomic.AtomicReference v, v;
long[] v, v, v, v, v, v, v, v, v;
int v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
org.apache.commons.math.exception.util.LocalizedFormats v;
java.lang.Object v;
v := @parameter: int;
v := @parameter: int;
if v >= 0 goto label;
v = new org.apache.commons.math.exception.NotPositiveException;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
specialinvoke v.<org.apache.commons.math.exception.NotPositiveException: void <init>(java.lang.Number)>(v);
throw v;
label:
if v <= v goto label;
v = new org.apache.commons.math.exception.NumberIsTooLargeException;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
specialinvoke v.<org.apache.commons.math.exception.NumberIsTooLargeException: void <init>(java.lang.Number,java.lang.Number,boolean)>(v, v, 1);
throw v;
label:
v = <org.apache.commons.math.util.ArithmeticUtils: java.util.concurrent.atomic.AtomicReference STIRLING_S2>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicReference: java.lang.Object get()>();
if v != null goto label;
v = newarray (long[])[26];
v = newarray (long)[1];
v[0] = 1L;
v[0] = v;
v = 1;
label:
v = lengthof v;
if v >= v goto label;
v = v + 1;
v = newarray (long)[v];
v[v] = v;
v = v[v];
v[0] = 0L;
v = v[v];
v[1] = 1L;
v = v[v];
v[v] = 1L;
v = 2;
label:
if v >= v goto label;
v = v[v];
v = v - 1;
v = v[v];
v = v[v];
v = v * v;
v = v - 1;
v = v[v];
v = v - 1;
v = v[v];
v = v + v;
v[v] = v;
v = v + 1;
goto label;
label:
v = v + 1;
goto label;
label:
v = <org.apache.commons.math.util.ArithmeticUtils: java.util.concurrent.atomic.AtomicReference STIRLING_S2>;
virtualinvoke v.<java.util.concurrent.atomic.AtomicReference: boolean compareAndSet(java.lang.Object,java.lang.Object)>(null, v);
label:
v = lengthof v;
if v >= v goto label;
v = v[v];
v = v[v];
return v;
label:
if v != 0 goto label;
return 0L;
label:
if v == 1 goto label;
if v != v goto label;
label:
return 1L;
label:
if v != 2 goto label;
v = v - 1;
v = 1L << v;
v = v - 1L;
return v;
label:
v = v - 1;
if v != v goto label;
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: long binomialCoefficient(int,int)>(v, 2);
return v;
label:
v = 0L;
v = v & 1;
if v != 0 goto label;
v = 1L;
goto label;
label:
v = -1L;
label:
v = v;
v = 1;
label:
if v > v goto label;
v = neg v;
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: long binomialCoefficient(int,int)>(v, v);
v = v * v;
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: int pow(int,int)>(v, v);
v = v * v;
v = v + v;
v = v cmp 0L;
if v >= 0 goto label;
v = new org.apache.commons.math.exception.MathArithmeticException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats ARGUMENT_OUTSIDE_DOMAIN>;
v = newarray (java.lang.Object)[3];
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v[0] = v;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(0);
v[1] = v;
v = lengthof v;
v = v - 1;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v[2] = v;
specialinvoke v.<org.apache.commons.math.exception.MathArithmeticException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Object[])>(v, v);
throw v;
label:
v = v + 1;
goto label;
label:
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: long factorial(int)>(v);
v = v / v;
return v;
}
private static long addAndCheck(long, long, org.apache.commons.math.exception.util.Localizable) throws org.apache.commons.math.exception.MathArithmeticException
{
java.lang.Object[] v, v;
long v, v, v, v, v;
org.apache.commons.math.exception.MathArithmeticException v, v;
byte v, v, v, v, v;
java.lang.Long v, v, v, v;
org.apache.commons.math.exception.util.Localizable v;
v := @parameter: long;
v := @parameter: long;
v := @parameter: org.apache.commons.math.exception.util.Localizable;
v = v cmp v;
if v <= 0 goto label;
v = staticinvoke <org.apache.commons.math.util.ArithmeticUtils: long addAndCheck(long,long,org.apache.commons.math.exception.util.Localizable)>(v, v, v);
goto label;
label:
v = v cmp 0L;
if v >= 0 goto label;
v = v cmp 0L;
if v >= 0 goto label;
v = -9223372036854775808L - v;
v = v cmp v;
if v > 0 goto label;
v = v + v;
goto label;
label:
v = new org.apache.commons.math.exception.MathArithmeticException;
v = newarray (java.lang.Object)[2];
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v[0] = v;
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v[1] = v;
specialinvoke v.<org.apache.commons.math.exception.MathArithmeticException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Object[])>(v, v);
throw v;
label:
v = v + v;
goto label;
label:
v = 9223372036854775807L - v;
v = v cmp v;
if v > 0 goto label;
v = v + v;
goto label;
label:
v = new org.apache.commons.math.exception.MathArithmeticException;
v = newarray (java.lang.Object)[2];
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v[0] = v;
v = staticinvoke <java.lang.Long: java.lang.Long valueOf(long)>(v);
v[1] = v;
specialinvoke v.<org.apache.commons.math.exception.MathArithmeticException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Object[])>(v, v);
throw v;
label:
return v;
}
private static void checkBinomial(int, int) throws org.apache.commons.math.exception.NumberIsTooLargeException, org.apache.commons.math.exception.NotPositiveException
{
org.apache.commons.math.exception.util.LocalizedFormats v, v;
java.lang.Integer v, v, v;
org.apache.commons.math.exception.NumberIsTooLargeException v;
org.apache.commons.math.exception.NotPositiveException v;
int v, v;
v := @parameter: int;
v := @parameter: int;
if v >= v goto label;
v = new org.apache.commons.math.exception.NumberIsTooLargeException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats BINOMIAL_INVALID_PARAMETERS_ORDER>;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
specialinvoke v.<org.apache.commons.math.exception.NumberIsTooLargeException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Number,java.lang.Number,boolean)>(v, v, v, 1);
throw v;
label:
if v >= 0 goto label;
v = new org.apache.commons.math.exception.NotPositiveException;
v = <org.apache.commons.math.exception.util.LocalizedFormats: org.apache.commons.math.exception.util.LocalizedFormats BINOMIAL_NEGATIVE_PARAMETER>;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
specialinvoke v.<org.apache.commons.math.exception.NotPositiveException: void <init>(org.apache.commons.math.exception.util.Localizable,java.lang.Number)>(v, v);
throw v;
label:
return;
}
public static boolean isPowerOfTwo(long)
{
byte v, v;
long v, v, v;
boolean v;
v := @parameter: long;
v = v cmp 0L;
if v <= 0 goto label;
v = v - 1L;
v = v & v;
v = v cmp 0L;
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
static void <clinit>()
{
long[] v;
java.util.concurrent.atomic.AtomicReference v;
v = newarray (long)[21];
v[0] = 1L;
v[1] = 1L;
v[2] = 2L;
v[3] = 6L;
v[4] = 24L;
v[5] = 120L;
v[6] = 720L;
v[7] = 5040L;
v[8] = 40320L;
v[9] = 362880L;
v[10] = 3628800L;
v[11] = 39916800L;
v[12] = 479001600L;
v[13] = 6227020800L;
v[14] = 87178291200L;
v[15] = 1307674368000L;
v[16] = 20922789888000L;
v[17] = 355687428096000L;
v[18] = 6402373705728000L;
v[19] = 121645100408832000L;
v[20] = 2432902008176640000L;
<org.apache.commons.math.util.ArithmeticUtils: long[] FACTORIALS> = v;
v = new java.util.concurrent.atomic.AtomicReference;
specialinvoke v.<java.util.concurrent.atomic.AtomicReference: void <init>(java.lang.Object)>(null);
<org.apache.commons.math.util.ArithmeticUtils: java.util.concurrent.atomic.AtomicReference STIRLING_S2> = v;
return;
}
}