public final class org.apache.commons.lang.math.Fraction extends java.lang.Number implements java.lang.Comparable
{
private static final long serialVersionUID;
public static final org.apache.commons.lang.math.Fraction ZERO;
public static final org.apache.commons.lang.math.Fraction ONE;
public static final org.apache.commons.lang.math.Fraction ONE_HALF;
public static final org.apache.commons.lang.math.Fraction ONE_THIRD;
public static final org.apache.commons.lang.math.Fraction TWO_THIRDS;
public static final org.apache.commons.lang.math.Fraction ONE_QUARTER;
public static final org.apache.commons.lang.math.Fraction TWO_QUARTERS;
public static final org.apache.commons.lang.math.Fraction THREE_QUARTERS;
public static final org.apache.commons.lang.math.Fraction ONE_FIFTH;
public static final org.apache.commons.lang.math.Fraction TWO_FIFTHS;
public static final org.apache.commons.lang.math.Fraction THREE_FIFTHS;
public static final org.apache.commons.lang.math.Fraction FOUR_FIFTHS;
private final int numerator;
private final int denominator;
private transient int hashCode;
private transient java.lang.String toString;
private transient java.lang.String toProperString;
private void <init>(int, int)
{
int v, v;
org.apache.commons.lang.math.Fraction v;
v := @this: org.apache.commons.lang.math.Fraction;
v := @parameter: int;
v := @parameter: int;
specialinvoke v.<java.lang.Number: void <init>()>();
v.<org.apache.commons.lang.math.Fraction: int numerator> = v;
v.<org.apache.commons.lang.math.Fraction: int denominator> = v;
return;
}
public static org.apache.commons.lang.math.Fraction getFraction(int, int)
{
int v, v;
java.lang.ArithmeticException v, v;
org.apache.commons.lang.math.Fraction v;
v := @parameter: int;
v := @parameter: int;
if v != 0 goto label;
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("The denominator must not be zero");
throw v;
label:
if v >= 0 goto label;
if v == -2147483648 goto label;
if v != -2147483648 goto label;
label:
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("overflow: can\'t negate");
throw v;
label:
v = neg v;
v = neg v;
label:
v = new org.apache.commons.lang.math.Fraction;
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(v, v);
return v;
}
public static org.apache.commons.lang.math.Fraction getFraction(int, int, int)
{
long v, v, v;
byte v, v;
int v, v, v;
java.lang.ArithmeticException v, v, v, v;
org.apache.commons.lang.math.Fraction v;
v := @parameter: int;
v := @parameter: int;
v := @parameter: int;
if v != 0 goto label;
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("The denominator must not be zero");
throw v;
label:
if v >= 0 goto label;
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("The denominator must not be negative");
throw v;
label:
if v >= 0 goto label;
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("The numerator must not be negative");
throw v;
label:
if v >= 0 goto label;
v = v * v;
v = v - v;
goto label;
label:
v = v * v;
v = v + v;
label:
v = v cmp -2147483648L;
if v < 0 goto label;
v = v cmp 2147483647L;
if v <= 0 goto label;
label:
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("Numerator too large to represent as an Integer.");
throw v;
label:
v = new org.apache.commons.lang.math.Fraction;
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(v, v);
return v;
}
public static org.apache.commons.lang.math.Fraction getReducedFraction(int, int)
{
int v, v, v, v, v, v;
java.lang.ArithmeticException v, v;
org.apache.commons.lang.math.Fraction v, v;
v := @parameter: int;
v := @parameter: int;
if v != 0 goto label;
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("The denominator must not be zero");
throw v;
label:
if v != 0 goto label;
v = <org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction ZERO>;
return v;
label:
if v != -2147483648 goto label;
v = v & 1;
if v != 0 goto label;
v = v / 2;
v = v / 2;
label:
if v >= 0 goto label;
if v == -2147483648 goto label;
if v != -2147483648 goto label;
label:
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("overflow: can\'t negate");
throw v;
label:
v = neg v;
v = neg v;
label:
v = staticinvoke <org.apache.commons.lang.math.Fraction: int greatestCommonDivisor(int,int)>(v, v);
v = v / v;
v = v / v;
v = new org.apache.commons.lang.math.Fraction;
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(v, v);
return v;
}
public static org.apache.commons.lang.math.Fraction getFraction(double)
{
byte v, v, v, v, v;
java.lang.ArithmeticException v, v;
boolean v;
org.apache.commons.lang.math.Fraction v;
int v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
double v, v, v, v, v, v, v, v, v, v, v, v;
v := @parameter: double;
v = v cmpg 0.0;
if v >= 0 goto label;
v = -1;
goto label;
label:
v = 1;
label:
v = v;
v = staticinvoke <java.lang.Math: double abs(double)>(v);
v = v cmpl 2.147483647E9;
if v > 0 goto label;
v = staticinvoke <java.lang.Double: boolean isNaN(double)>(v);
if v == 0 goto label;
label:
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("The value must not be greater than Integer.MAX_VALUE or NaN");
throw v;
label:
v = v - v;
v = 0;
v = 1;
v = 1;
v = 0;
v = 1.0;
v = v - v;
v = 1.7976931348623157E308;
v = 1;
label:
v = v;
v = v / v;
v = v * v;
v = v - v;
v = v * v;
v = v + v;
v = v * v;
v = v + v;
v = v / v;
v = v - v;
v = staticinvoke <java.lang.Math: double abs(double)>(v);
v = v;
v = v;
v = v;
v = v;
v = v;
v = v;
v = v;
v = v + 1;
v = v cmpl v;
if v <= 0 goto label;
if v > 10000 goto label;
if v <= 0 goto label;
if v < 25 goto label;
label:
if v != 25 goto label;
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("Unable to convert double to fraction");
throw v;
label:
v = v * v;
v = v + v;
v = v * v;
v = staticinvoke <org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction getReducedFraction(int,int)>(v, v);
return v;
}
public static org.apache.commons.lang.math.Fraction getFraction(java.lang.String)
{
java.lang.Object[] v;
int v, v, v, v, v, v, v, v, v, v, v, v, v;
java.lang.String v, v, v, v, v, v, v;
double v;
java.lang.NumberFormatException v;
org.apache.commons.lang.math.Fraction v, v, v, v;
v := @parameter: java.lang.String;
v = newarray (java.lang.Object)[0];
staticinvoke <org.apache.commons.lang.Validate: java.lang.Object notNull(java.lang.Object,java.lang.String,java.lang.Object[])>(v, "str", v);
v = virtualinvoke v.<java.lang.String: int indexOf(int)>(46);
if v < 0 goto label;
v = staticinvoke <java.lang.Double: double parseDouble(java.lang.String)>(v);
v = staticinvoke <org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction getFraction(double)>(v);
return v;
label:
v = virtualinvoke v.<java.lang.String: int indexOf(int)>(32);
if v <= 0 goto label;
v = virtualinvoke v.<java.lang.String: java.lang.String substring(int,int)>(0, v);
v = staticinvoke <java.lang.Integer: int parseInt(java.lang.String)>(v);
v = v + 1;
v = virtualinvoke v.<java.lang.String: java.lang.String substring(int)>(v);
v = virtualinvoke v.<java.lang.String: int indexOf(int)>(47);
if v >= 0 goto label;
v = new java.lang.NumberFormatException;
specialinvoke v.<java.lang.NumberFormatException: void <init>(java.lang.String)>("The fraction could not be parsed as the format X Y/Z");
throw v;
label:
v = virtualinvoke v.<java.lang.String: java.lang.String substring(int,int)>(0, v);
v = staticinvoke <java.lang.Integer: int parseInt(java.lang.String)>(v);
v = v + 1;
v = virtualinvoke v.<java.lang.String: java.lang.String substring(int)>(v);
v = staticinvoke <java.lang.Integer: int parseInt(java.lang.String)>(v);
v = staticinvoke <org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction getFraction(int,int,int)>(v, v, v);
return v;
label:
v = virtualinvoke v.<java.lang.String: int indexOf(int)>(47);
if v >= 0 goto label;
v = staticinvoke <java.lang.Integer: int parseInt(java.lang.String)>(v);
v = staticinvoke <org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction getFraction(int,int)>(v, 1);
return v;
label:
v = virtualinvoke v.<java.lang.String: java.lang.String substring(int,int)>(0, v);
v = staticinvoke <java.lang.Integer: int parseInt(java.lang.String)>(v);
v = v + 1;
v = virtualinvoke v.<java.lang.String: java.lang.String substring(int)>(v);
v = staticinvoke <java.lang.Integer: int parseInt(java.lang.String)>(v);
v = staticinvoke <org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction getFraction(int,int)>(v, v);
return v;
}
public int getNumerator()
{
int v;
org.apache.commons.lang.math.Fraction v;
v := @this: org.apache.commons.lang.math.Fraction;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
return v;
}
public int getDenominator()
{
int v;
org.apache.commons.lang.math.Fraction v;
v := @this: org.apache.commons.lang.math.Fraction;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
return v;
}
public int getProperNumerator()
{
int v, v, v, v;
org.apache.commons.lang.math.Fraction v;
v := @this: org.apache.commons.lang.math.Fraction;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = v % v;
v = staticinvoke <java.lang.Math: int abs(int)>(v);
return v;
}
public int getProperWhole()
{
int v, v, v;
org.apache.commons.lang.math.Fraction v;
v := @this: org.apache.commons.lang.math.Fraction;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = v / v;
return v;
}
public int intValue()
{
int v, v, v;
org.apache.commons.lang.math.Fraction v;
v := @this: org.apache.commons.lang.math.Fraction;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = v / v;
return v;
}
public long longValue()
{
int v, v;
long v;
org.apache.commons.lang.math.Fraction v;
v := @this: org.apache.commons.lang.math.Fraction;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = v / v;
return v;
}
public float floatValue()
{
int v, v;
float v;
org.apache.commons.lang.math.Fraction v;
v := @this: org.apache.commons.lang.math.Fraction;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = v / v;
return v;
}
public double doubleValue()
{
int v, v;
org.apache.commons.lang.math.Fraction v;
double v;
v := @this: org.apache.commons.lang.math.Fraction;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = v / v;
return v;
}
public org.apache.commons.lang.math.Fraction reduce()
{
int v, v, v, v, v, v, v, v, v;
org.apache.commons.lang.math.Fraction v, v, v, v;
boolean v;
v := @this: org.apache.commons.lang.math.Fraction;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
if v != 0 goto label;
v = <org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction ZERO>;
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: boolean equals(java.lang.Object)>(v);
if v == 0 goto label;
v = v;
goto label;
label:
v = <org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction ZERO>;
label:
return v;
label:
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = staticinvoke <java.lang.Math: int abs(int)>(v);
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = staticinvoke <org.apache.commons.lang.math.Fraction: int greatestCommonDivisor(int,int)>(v, v);
if v != 1 goto label;
return v;
label:
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = v / v;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = v / v;
v = staticinvoke <org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction getFraction(int,int)>(v, v);
return v;
}
public org.apache.commons.lang.math.Fraction invert()
{
int v, v, v, v, v, v, v, v, v;
java.lang.ArithmeticException v, v;
org.apache.commons.lang.math.Fraction v, v, v;
v := @this: org.apache.commons.lang.math.Fraction;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
if v != 0 goto label;
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("Unable to invert zero.");
throw v;
label:
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
if v != -2147483648 goto label;
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("overflow: can\'t negate numerator");
throw v;
label:
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
if v >= 0 goto label;
v = new org.apache.commons.lang.math.Fraction;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = neg v;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = neg v;
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(v, v);
return v;
label:
v = new org.apache.commons.lang.math.Fraction;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(v, v);
return v;
}
public org.apache.commons.lang.math.Fraction negate()
{
int v, v, v, v;
java.lang.ArithmeticException v;
org.apache.commons.lang.math.Fraction v, v;
v := @this: org.apache.commons.lang.math.Fraction;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
if v != -2147483648 goto label;
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("overflow: too large to negate");
throw v;
label:
v = new org.apache.commons.lang.math.Fraction;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = neg v;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(v, v);
return v;
}
public org.apache.commons.lang.math.Fraction abs()
{
int v;
org.apache.commons.lang.math.Fraction v, v;
v := @this: org.apache.commons.lang.math.Fraction;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
if v < 0 goto label;
return v;
label:
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction negate()>();
return v;
}
public org.apache.commons.lang.math.Fraction pow(int)
{
int v, v, v, v, v, v, v;
org.apache.commons.lang.math.Fraction v, v, v, v, v, v, v, v, v, v, v;
v := @this: org.apache.commons.lang.math.Fraction;
v := @parameter: int;
if v != 1 goto label;
return v;
label:
if v != 0 goto label;
v = <org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction ONE>;
return v;
label:
if v >= 0 goto label;
if v != -2147483648 goto label;
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction invert()>();
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction pow(int)>(2);
v = v / 2;
v = neg v;
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction pow(int)>(v);
return v;
label:
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction invert()>();
v = neg v;
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction pow(int)>(v);
return v;
label:
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction multiplyBy(org.apache.commons.lang.math.Fraction)>(v);
v = v % 2;
if v != 0 goto label;
v = v / 2;
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction pow(int)>(v);
return v;
label:
v = v / 2;
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction pow(int)>(v);
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction multiplyBy(org.apache.commons.lang.math.Fraction)>(v);
return v;
}
private static int greatestCommonDivisor(int, int)
{
int v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
java.lang.ArithmeticException v, v;
v := @parameter: int;
v := @parameter: int;
if v == 0 goto label;
if v != 0 goto label;
label:
if v == -2147483648 goto label;
if v != -2147483648 goto label;
label:
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("overflow: gcd is 2^31");
throw v;
label:
v = staticinvoke <java.lang.Math: int abs(int)>(v);
v = staticinvoke <java.lang.Math: int abs(int)>(v);
v = v + v;
return v;
label:
v = staticinvoke <java.lang.Math: int abs(int)>(v);
if v == 1 goto label;
v = staticinvoke <java.lang.Math: int abs(int)>(v);
if v != 1 goto label;
label:
return 1;
label:
if v <= 0 goto label;
v = neg v;
label:
if v <= 0 goto label;
v = neg v;
label:
v = 0;
label:
v = v & 1;
if v != 0 goto label;
v = v & 1;
if v != 0 goto label;
if v >= 31 goto label;
v = v / 2;
v = v / 2;
v = v + 1;
goto label;
label:
if v != 31 goto label;
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("overflow: gcd is 2^31");
throw v;
label:
v = v & 1;
if v != 1 goto label;
v = v;
goto label;
label:
v = v / 2;
v = neg v;
label:
v = v;
label:
v = v & 1;
if v != 0 goto label;
v = v / 2;
goto label;
label:
if v <= 0 goto label;
v = neg v;
goto label;
label:
v = v;
label:
v = v - v;
v = v / 2;
if v != 0 goto label;
v = neg v;
v = 1 << v;
v = v * v;
return v;
}
private static int mulAndCheck(int, int)
{
byte v, v;
int v, v;
java.lang.ArithmeticException v;
long 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 java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("overflow: mul");
throw v;
label:
return v;
}
private static int mulPosAndCheck(int, int)
{
byte v;
int v, v;
java.lang.ArithmeticException v;
long v;
v := @parameter: int;
v := @parameter: int;
v = v * v;
v = v cmp 2147483647L;
if v <= 0 goto label;
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("overflow: mulPos");
throw v;
label:
return v;
}
private static int addAndCheck(int, int)
{
byte v, v;
int v, v;
java.lang.ArithmeticException v;
long 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 java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("overflow: add");
throw v;
label:
return v;
}
private static int subAndCheck(int, int)
{
byte v, v;
int v, v;
java.lang.ArithmeticException v;
long 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 java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("overflow: add");
throw v;
label:
return v;
}
public org.apache.commons.lang.math.Fraction add(org.apache.commons.lang.math.Fraction)
{
org.apache.commons.lang.math.Fraction v, v, v;
v := @this: org.apache.commons.lang.math.Fraction;
v := @parameter: org.apache.commons.lang.math.Fraction;
v = specialinvoke v.<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction addSub(org.apache.commons.lang.math.Fraction,boolean)>(v, 1);
return v;
}
public org.apache.commons.lang.math.Fraction subtract(org.apache.commons.lang.math.Fraction)
{
org.apache.commons.lang.math.Fraction v, v, v;
v := @this: org.apache.commons.lang.math.Fraction;
v := @parameter: org.apache.commons.lang.math.Fraction;
v = specialinvoke v.<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction addSub(org.apache.commons.lang.math.Fraction,boolean)>(v, 0);
return v;
}
private org.apache.commons.lang.math.Fraction addSub(org.apache.commons.lang.math.Fraction, boolean)
{
java.lang.ArithmeticException v;
java.math.BigInteger v, v, v, v, v, v, v, v, v, v, v, v;
boolean v;
org.apache.commons.lang.math.Fraction v, v, v, v, v;
java.lang.Object[] v;
int v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
v := @this: org.apache.commons.lang.math.Fraction;
v := @parameter: org.apache.commons.lang.math.Fraction;
v := @parameter: boolean;
v = newarray (java.lang.Object)[0];
staticinvoke <org.apache.commons.lang.Validate: java.lang.Object notNull(java.lang.Object,java.lang.String,java.lang.Object[])>(v, "fraction", v);
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
if v != 0 goto label;
if v == 0 goto label;
v = v;
goto label;
label:
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction negate()>();
label:
return v;
label:
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
if v != 0 goto label;
return v;
label:
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = staticinvoke <org.apache.commons.lang.math.Fraction: int greatestCommonDivisor(int,int)>(v, v);
if v != 1 goto label;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = staticinvoke <org.apache.commons.lang.math.Fraction: int mulAndCheck(int,int)>(v, v);
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = staticinvoke <org.apache.commons.lang.math.Fraction: int mulAndCheck(int,int)>(v, v);
v = new org.apache.commons.lang.math.Fraction;
if v == 0 goto label;
v = staticinvoke <org.apache.commons.lang.math.Fraction: int addAndCheck(int,int)>(v, v);
goto label;
label:
v = staticinvoke <org.apache.commons.lang.math.Fraction: int subAndCheck(int,int)>(v, v);
label:
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = staticinvoke <org.apache.commons.lang.math.Fraction: int mulPosAndCheck(int,int)>(v, v);
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(v, v);
return v;
label:
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = staticinvoke <java.math.BigInteger: java.math.BigInteger valueOf(long)>(v);
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = v / v;
v = staticinvoke <java.math.BigInteger: java.math.BigInteger valueOf(long)>(v);
v = virtualinvoke v.<java.math.BigInteger: java.math.BigInteger multiply(java.math.BigInteger)>(v);
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = staticinvoke <java.math.BigInteger: java.math.BigInteger valueOf(long)>(v);
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = v / v;
v = staticinvoke <java.math.BigInteger: java.math.BigInteger valueOf(long)>(v);
v = virtualinvoke v.<java.math.BigInteger: java.math.BigInteger multiply(java.math.BigInteger)>(v);
if v == 0 goto label;
v = virtualinvoke v.<java.math.BigInteger: java.math.BigInteger add(java.math.BigInteger)>(v);
goto label;
label:
v = virtualinvoke v.<java.math.BigInteger: java.math.BigInteger subtract(java.math.BigInteger)>(v);
label:
v = v;
v = staticinvoke <java.math.BigInteger: java.math.BigInteger valueOf(long)>(v);
v = virtualinvoke v.<java.math.BigInteger: java.math.BigInteger mod(java.math.BigInteger)>(v);
v = virtualinvoke v.<java.math.BigInteger: int intValue()>();
if v != 0 goto label;
v = v;
goto label;
label:
v = staticinvoke <org.apache.commons.lang.math.Fraction: int greatestCommonDivisor(int,int)>(v, v);
label:
v = staticinvoke <java.math.BigInteger: java.math.BigInteger valueOf(long)>(v);
v = virtualinvoke v.<java.math.BigInteger: java.math.BigInteger divide(java.math.BigInteger)>(v);
v = virtualinvoke v.<java.math.BigInteger: int bitLength()>();
if v <= 31 goto label;
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("overflow: numerator too large after multiply");
throw v;
label:
v = new org.apache.commons.lang.math.Fraction;
v = virtualinvoke v.<java.math.BigInteger: int intValue()>();
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = v / v;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = v / v;
v = staticinvoke <org.apache.commons.lang.math.Fraction: int mulPosAndCheck(int,int)>(v, v);
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(v, v);
return v;
}
public org.apache.commons.lang.math.Fraction multiplyBy(org.apache.commons.lang.math.Fraction)
{
java.lang.Object[] v;
int v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
org.apache.commons.lang.math.Fraction v, v, v, v;
v := @this: org.apache.commons.lang.math.Fraction;
v := @parameter: org.apache.commons.lang.math.Fraction;
v = newarray (java.lang.Object)[0];
staticinvoke <org.apache.commons.lang.Validate: java.lang.Object notNull(java.lang.Object,java.lang.String,java.lang.Object[])>(v, "fraction", v);
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
if v == 0 goto label;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
if v != 0 goto label;
label:
v = <org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction ZERO>;
return v;
label:
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = staticinvoke <org.apache.commons.lang.math.Fraction: int greatestCommonDivisor(int,int)>(v, v);
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = staticinvoke <org.apache.commons.lang.math.Fraction: int greatestCommonDivisor(int,int)>(v, v);
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = v / v;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = v / v;
v = staticinvoke <org.apache.commons.lang.math.Fraction: int mulAndCheck(int,int)>(v, v);
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = v / v;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = v / v;
v = staticinvoke <org.apache.commons.lang.math.Fraction: int mulPosAndCheck(int,int)>(v, v);
v = staticinvoke <org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction getReducedFraction(int,int)>(v, v);
return v;
}
public org.apache.commons.lang.math.Fraction divideBy(org.apache.commons.lang.math.Fraction)
{
java.lang.Object[] v;
int v;
java.lang.ArithmeticException v;
org.apache.commons.lang.math.Fraction v, v, v, v;
v := @this: org.apache.commons.lang.math.Fraction;
v := @parameter: org.apache.commons.lang.math.Fraction;
v = newarray (java.lang.Object)[0];
staticinvoke <org.apache.commons.lang.Validate: java.lang.Object notNull(java.lang.Object,java.lang.String,java.lang.Object[])>(v, "fraction", v);
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
if v != 0 goto label;
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("The fraction to divide by must not be zero");
throw v;
label:
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction invert()>();
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction multiplyBy(org.apache.commons.lang.math.Fraction)>(v);
return v;
}
public boolean equals(java.lang.Object)
{
int v, v, v, v;
java.lang.Object v;
org.apache.commons.lang.math.Fraction v;
boolean v, v;
v := @this: org.apache.commons.lang.math.Fraction;
v := @parameter: java.lang.Object;
if v != v goto label;
return 1;
label:
v = v instanceof org.apache.commons.lang.math.Fraction;
if v != 0 goto label;
return 0;
label:
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: int getNumerator()>();
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: int getNumerator()>();
if v != v goto label;
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: int getDenominator()>();
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: int getDenominator()>();
if v != v goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
public int hashCode()
{
int v, v, v, v, v, v, v;
org.apache.commons.lang.math.Fraction v;
v := @this: org.apache.commons.lang.math.Fraction;
v = v.<org.apache.commons.lang.math.Fraction: int hashCode>;
if v != 0 goto label;
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: int getNumerator()>();
v = 629 + v;
v = 37 * v;
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: int getDenominator()>();
v = v + v;
v.<org.apache.commons.lang.math.Fraction: int hashCode> = v;
label:
v = v.<org.apache.commons.lang.math.Fraction: int hashCode>;
return v;
}
public int compareTo(org.apache.commons.lang.math.Fraction)
{
long v, v;
int v, v, v, v, v, v, v, v, v;
org.apache.commons.lang.math.Fraction v, v;
v := @this: org.apache.commons.lang.math.Fraction;
v := @parameter: org.apache.commons.lang.math.Fraction;
if v != v goto label;
return 0;
label:
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
if v != v goto label;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
if v != v goto label;
return 0;
label:
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = v * v;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = v * v;
v = staticinvoke <java.lang.Long: int compare(long,long)>(v, v);
return v;
}
public java.lang.String toString()
{
int v, v;
java.lang.String v, v, v;
org.apache.commons.lang.math.Fraction v;
v := @this: org.apache.commons.lang.math.Fraction;
v = v.<org.apache.commons.lang.math.Fraction: java.lang.String toString>;
if v != null goto label;
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: int getNumerator()>();
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: int getDenominator()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int,int)>(v, v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("\u0001/\u0001");
v.<org.apache.commons.lang.math.Fraction: java.lang.String toString> = v;
label:
v = v.<org.apache.commons.lang.math.Fraction: java.lang.String toString>;
return v;
}
public java.lang.String toProperString()
{
int v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
java.lang.String v, v, v, v, v;
org.apache.commons.lang.math.Fraction v;
v := @this: org.apache.commons.lang.math.Fraction;
v = v.<org.apache.commons.lang.math.Fraction: java.lang.String toProperString>;
if v != null goto label;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
if v != 0 goto label;
v.<org.apache.commons.lang.math.Fraction: java.lang.String toProperString> = "0";
goto label;
label:
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
if v != v goto label;
v.<org.apache.commons.lang.math.Fraction: java.lang.String toProperString> = "1";
goto label;
label:
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = (int) -1;
v = v * v;
if v != v goto label;
v.<org.apache.commons.lang.math.Fraction: java.lang.String toProperString> = "-1";
goto label;
label:
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
if v <= 0 goto label;
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
v = neg v;
goto label;
label:
v = v.<org.apache.commons.lang.math.Fraction: int numerator>;
label:
v = v.<org.apache.commons.lang.math.Fraction: int denominator>;
v = neg v;
if v >= v goto label;
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: int getProperNumerator()>();
if v != 0 goto label;
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: int getProperWhole()>();
v = staticinvoke <java.lang.Integer: java.lang.String toString(int)>(v);
v.<org.apache.commons.lang.math.Fraction: java.lang.String toProperString> = v;
goto label;
label:
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: int getProperWhole()>();
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: int getDenominator()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int,int,int)>(v, v, v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("\u \u0001/\u0001");
v.<org.apache.commons.lang.math.Fraction: java.lang.String toProperString> = v;
goto label;
label:
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: int getNumerator()>();
v = virtualinvoke v.<org.apache.commons.lang.math.Fraction: int getDenominator()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int,int)>(v, v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("\u0001/\u0001");
v.<org.apache.commons.lang.math.Fraction: java.lang.String toProperString> = v;
label:
v = v.<org.apache.commons.lang.math.Fraction: java.lang.String toProperString>;
return v;
}
static void <clinit>()
{
org.apache.commons.lang.math.Fraction v, v, v, v, v, v, v, v, v, v, v, v;
v = new org.apache.commons.lang.math.Fraction;
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(0, 1);
<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction ZERO> = v;
v = new org.apache.commons.lang.math.Fraction;
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(1, 1);
<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction ONE> = v;
v = new org.apache.commons.lang.math.Fraction;
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(1, 2);
<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction ONE_HALF> = v;
v = new org.apache.commons.lang.math.Fraction;
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(1, 3);
<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction ONE_THIRD> = v;
v = new org.apache.commons.lang.math.Fraction;
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(2, 3);
<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction TWO_THIRDS> = v;
v = new org.apache.commons.lang.math.Fraction;
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(1, 4);
<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction ONE_QUARTER> = v;
v = new org.apache.commons.lang.math.Fraction;
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(2, 4);
<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction TWO_QUARTERS> = v;
v = new org.apache.commons.lang.math.Fraction;
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(3, 4);
<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction THREE_QUARTERS> = v;
v = new org.apache.commons.lang.math.Fraction;
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(1, 5);
<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction ONE_FIFTH> = v;
v = new org.apache.commons.lang.math.Fraction;
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(2, 5);
<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction TWO_FIFTHS> = v;
v = new org.apache.commons.lang.math.Fraction;
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(3, 5);
<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction THREE_FIFTHS> = v;
v = new org.apache.commons.lang.math.Fraction;
specialinvoke v.<org.apache.commons.lang.math.Fraction: void <init>(int,int)>(4, 5);
<org.apache.commons.lang.math.Fraction: org.apache.commons.lang.math.Fraction FOUR_FIFTHS> = v;
return;
}
}