Uses of Class
org.apache.commons.numbers.fraction.Fraction
Packages that use Fraction
Package
Description
Field-related utilities.
Fraction number type and fraction number formatting.
-
Uses of Fraction in org.apache.commons.numbers.field
Subclasses with type arguments of type Fraction in org.apache.commons.numbers.fieldMethods in org.apache.commons.numbers.field that return Fraction -
Uses of Fraction in org.apache.commons.numbers.fraction
Classes in org.apache.commons.numbers.fraction that implement interfaces with type arguments of type FractionModifier and TypeClassDescriptionfinal classRepresentation of a rational number.final classRepresentation of a rational number.Fields in org.apache.commons.numbers.fraction declared as FractionModifier and TypeFieldDescriptionstatic final FractionFraction.ONEA fraction representing "1".static final FractionFraction.ZEROA fraction representing "0".Methods in org.apache.commons.numbers.fraction that return FractionModifier and TypeMethodDescriptionFraction.abs()Returns the absolute value of this fraction.Fraction.add(int value) Adds the specifiedvalueto this fraction, returning the result in reduced form.Adds the specifiedvalueto this fraction, returning the result in reduced form.private FractionImplements add and subtract using algorithm described in Knuth 4.5.1.Fraction.divide(int value) Divide this fraction by the passedvalue, returning the result in reduced form.Divide this fraction by the passedvalue, returning the result in reduced form.static FractionFraction.from(double value) Create a fraction given the double value.static FractionFraction.from(double value, double epsilon, int maxIterations) Create a fraction given the double value and maximum error allowed.static FractionFraction.from(double value, int maxDenominator) Create a fraction given the double value and maximum denominator.Fraction.multiply(int value) Multiply this fraction by the passedvalue, returning the result in reduced form.private FractionFraction.multiply(int num, int den) Multiply this fraction by the passed fraction decomposed into a numerator and denominator, returning the result in reduced form.Multiply this fraction by the passedvalue, returning the result in reduced form.Fraction.negate()static FractionFraction.of(int num) Create a fraction given the numerator.static FractionFraction.of(int num, int den) Create a fraction given the numerator and denominator.Fraction.one()static FractionReturns aFractioninstance representing the specified strings.Fraction.pow(int exponent) Returns aFractionwhose value isthisexponent, returning the result in reduced form.Fraction.reciprocal()Multiplicative inverse.Fraction.subtract(int value) Subtracts the specifiedvaluefrom this fraction, returning the result in reduced form.Subtracts the specifiedvaluefrom this fraction, returning the result in reduced form.Fraction.zero()Methods in org.apache.commons.numbers.fraction with parameters of type FractionModifier and TypeMethodDescriptionAdds the specifiedvalueto this fraction, returning the result in reduced form.private FractionImplements add and subtract using algorithm described in Knuth 4.5.1.intCompares this object with the specified object for order using the signed magnitude.Divide this fraction by the passedvalue, returning the result in reduced form.Multiply this fraction by the passedvalue, returning the result in reduced form.Subtracts the specifiedvaluefrom this fraction, returning the result in reduced form.