Uses of Class
org.znerd.math.RationalNumber
-
Uses of RationalNumber in org.znerd.math
Subclasses of RationalNumber in org.znerd.mathModifier and TypeClassDescriptionfinal classBasic implementation of aDigitSet.classBasic implementation of a rational number.final classBasic implementation of an integer number.classA set of digits, having a radix and an exponent.classAn immutable integer number.final classImplementation of anIntegerNumberbased on aintvalue.Methods in org.znerd.math that return RationalNumberModifier and TypeMethodDescriptionIntegerNumber.add(RationalNumber n) RationalNumber.add(RationalNumber n) Computes this+n, where n is a rational number.static RationalNumberNumberCentral.createFraction(int numerator, int denominator) Returns a fraction with the given numerator and denominator, both being anint.static RationalNumberNumberCentral.createFraction(IntegerNumber numerator, IntegerNumber denominator) Returns a fraction with the given numerator and denominator.IntegerNumber.divide(RationalNumber n) RationalNumber.divide(RationalNumber n) Computes this/n, where n is a rational number.IntegerNumber.multiply(RationalNumber n) RationalNumber.multiply(RationalNumber n) Computes this*n, where n is a rational number.final RationalNumberRationalNumber.pow(IntegerNumber n) protected RationalNumberBigIntegerNumber.powImpl(int exponent) IntegerNumber.powImpl(IntegerNumber n) protected RationalNumberRationalNumber.powImpl(IntegerNumber n) IntegerNumber.subtract(RationalNumber n) RationalNumber.subtract(RationalNumber n) Computes this-n, where n is a rational number.static RationalNumberNumberCentral.valueOf(double n) Converts adoubleto aRationalNumber.static RationalNumberNumberCentral.valueOf(float n) Converts afloatto aRationalNumber.static RationalNumberNumberCentral.valueOf(BigDecimal n) Converts aBigDecimalto aRationalNumber.Methods in org.znerd.math with parameters of type RationalNumberModifier and TypeMethodDescriptionIntegerNumber.add(RationalNumber n) RationalNumber.add(RationalNumber n) Computes this+n, where n is a rational number.protected final intRationalNumber.compareTo(RationalNumber n) Compares this number with the specified rational number, first level.protected intIntegerNumber.compareToImpl(RationalNumber n) protected intRationalNumber.compareToImpl(RationalNumber n) Compares this number with the specified rational number, second level.IntegerNumber.divide(RationalNumber n) RationalNumber.divide(RationalNumber n) Computes this/n, where n is a rational number.IntegerNumber.multiply(RationalNumber n) RationalNumber.multiply(RationalNumber n) Computes this*n, where n is a rational number.IntegerNumber.subtract(RationalNumber n) RationalNumber.subtract(RationalNumber n) Computes this-n, where n is a rational number.