Uses of Class
org.znerd.math.RealNumber
-
Uses of RealNumber in org.znerd.math
Subclasses of RealNumber in org.znerd.mathModifier and TypeClassDescriptionclassAbstract base class forCompositeNumberimplementations.final classBasic implementation of aDigitSet.classBasic implementation of a rational number.final classBasic implementation of an integer number.classA composite real number.classA set of digits, having a radix and an exponent.classAn immutable integer number.classA power, consisting of a base and an exponent.classA product of two real numbers.classRational number.final classImplementation of anIntegerNumberbased on aintvalue.classA sum of two real numbers.Methods in org.znerd.math that return RealNumberModifier and TypeMethodDescriptionfinal RealNumberIntegerNumber.abs()RealNumber.abs()Computes |this|.RationalNumber.add(RealNumber n) RealNumber.add(RealNumber n) Computes this + n, where n is a real number.RationalNumber.divide(RealNumber n) RealNumber.divide(RealNumber n) Computes this/n, where n is a real number.Power.getBase()Returns the base of this power.AbstractCompositeNumber.getElement(int n) abstract RealNumberCompositeNumber.getElement(int n) Returns the nth operand.Sum.getElement(int n) AbstractCompositeNumber.getElements()abstract RealNumber[]CompositeNumber.getElements()Returns the operands.Sum.getElements()Power.getExponent()Returns the exponent of this power.CanNotCompareException.getNumbers()Returns the numbers that could not be compared in a new array.IntegerNumber.invert()RationalNumber.invert()RealNumber.invert()Computes 1/this.RationalNumber.multiply(RealNumber n) RealNumber.multiply(RealNumber n) Computes this * n, where n is a real number.final RealNumberIntegerNumber.negate()RationalNumber.negate()RealNumber.negate()Computes -this.RealNumber.pow(RealNumber n) Computes thisn, where n is a real number.final RealNumberRationalNumber.powImpl(RealNumber n) protected RealNumberRealNumber.powImpl(RealNumber n) Computes thisn, where n is a real number, second level.RationalNumber.subtract(RealNumber n) RealNumber.subtract(RealNumber n) Computes this - n, where n is a real number.Methods in org.znerd.math with parameters of type RealNumberModifier and TypeMethodDescriptionRationalNumber.add(RealNumber n) RealNumber.add(RealNumber n) Computes this + n, where n is a real number.static voidNumberCentral.checkDivideByZero(RealNumber n) Checks if dividing by the specified number would result in a division by zero.final intRealNumber.compareTo(RealNumber n) Compares this number with the specified number.protected final intRationalNumber.compareToImpl(RealNumber n) Compares this number with the specified number, second level.protected intRealNumber.compareToImpl(RealNumber n) Compares this number with the specified number, second level.protected intSum.compareToImpl(RealNumber n) protected intRationalNumber.compareToImpl2(RealNumber n) Compares this number with the specified number, third level.static PowerPower.createInstance(RealNumber base, RealNumber exponent) Returns aPowerwith the specified operands.static ProductProduct.createInstance(RealNumber a, RealNumber b) Returns aProductwith the specified operands.static SumSum.createInstance(RealNumber a, RealNumber b) Returns aSumwith the specified operands.protected static intPower.determineSign(RealNumber base, RealNumber exponent) Computes the sign of a power with the specified operands.protected static intProduct.determineSign(RealNumber a, RealNumber b) Computes the sign of a product with the specified operands.RationalNumber.divide(RealNumber n) RealNumber.divide(RealNumber n) Computes this/n, where n is a real number.RationalNumber.multiply(RealNumber n) RealNumber.multiply(RealNumber n) Computes this * n, where n is a real number.RealNumber.pow(RealNumber n) Computes thisn, where n is a real number.final RealNumberRationalNumber.powImpl(RealNumber n) protected RealNumberRealNumber.powImpl(RealNumber n) Computes thisn, where n is a real number, second level.final booleanRoundingMode.round(RealNumber number, int radix, int digit) Rounds the specified digit for a number in the specified base.protected abstract booleanRoundingMode.roundImpl(RealNumber number, int sign, int radix, int digit) Actually rounds the specified digit for a number in the specified base.RationalNumber.subtract(RealNumber n) RealNumber.subtract(RealNumber n) Computes this - n, where n is a real number.Constructors in org.znerd.math with parameters of type RealNumberModifierConstructorDescriptionprotectedAbstractCompositeNumber(int sign, String asString, RealNumber[] elements) Constructs a newAbstractCompositeNumberobject.Constructs a newCanNotCompareExceptionfor a failed comparison between the specified numbers.protectedPower(RealNumber base, RealNumber exponent) Constructs aPowerwith the specified base and exponent.protectedProduct(RealNumber a, RealNumber b) Constructs aProductbased on the 2 specified operands.protectedSum(RealNumber a, RealNumber b) Constructs aSumbased on the 2 specified operands.