public interface IRational extends ISignedNumber, IBigNumber
ASTID, BLANKID, COMPLEXID, DOUBLECOMPLEXID, DOUBLEID, FRACTIONID, INTEGERID, METHODSYMBOLID, PATTERNID, STRINGID, SYMBOLID
Modifier and Type | Method and Description |
---|---|
IRational |
abs()
Absolute value of this.
|
IRational |
add(IRational parm1) |
IInteger |
ceil() |
int |
compareInt(int value) |
IRational |
divideBy(IRational parm1) |
boolean |
equalsFraction(int numerator,
int denominator)
Check if this number equals the given fraction
numerator/denominator number. |
IAST |
factorInteger()
Return the factors paired with their exponents for integer and fractional
numbers.
|
IInteger |
floor() |
java.math.BigInteger |
getBigDenominator()
Returns the denominator of this fraction.
|
java.math.BigInteger |
getBigNumerator()
Returns the numerator of this fraction.
|
IInteger |
getDenominator()
Returns the denominator of this fraction.
|
org.apache.commons.math4.fraction.BigFraction |
getFraction()
Returns this number as
BigFraction number. |
IInteger |
getNumerator()
Returns the numerator of this fraction.
|
IRational |
multiply(IRational parm1) |
IRational |
negate()
Returns (-1) * this
|
INumber |
normalize()
Return the normalized form of this number (i.e. if the denominator part
equals one, return the numerator part as an integer number).
|
IRational |
pow(long exp)
Returns this number raised at the specified exponent.
|
IRational |
subtract(IRational parm1) |
apfloatNumValue, divideBy, doubleValue, inverse, isGreaterThan, isLessThan, isNegative, isPositive, isZero, numValue, opposite, round, sign, subtractFrom, toInt, toLong
numericNumber
apcomplexNumValue, ceilFraction, compareAbsValueToOne, complexNumValue, complexSign, conjugate, eabs, equalsInt, floorFraction, getIm, getImaginary, getRe, getReal
$div, $minus, $plus, $times, $up, accept, accept, accept, accept, and, apply, apply, asType, compareTo, dec, divide, evalComplex, evalDouble, evalNumber, evalSignedNumber, evaluate, evaluateHead, fullFormString, getAt, getField, head, hierarchy, ifPresent, inc, internalFormString, internalJavaString, internalScalaString, isAllExpanded, isAnd, isArcCos, isArcCosh, isArcSin, isArcSinh, isArcTan, isArcTanh, isAST, isAST, isAST, isAST, isAST, isAST, isAST, isASTSizeGE, isAtom, isBlank, isComplex, isComplexInfinity, isComplexNumeric, isCondition, isConstant, isCos, isCosh, isDerivative, isDirectedInfinity, isE, isExpanded, isFalse, isFlatAST, isFraction, isFree, isFree, isFree, isFreeAST, isFreeAST, isFreeOfPatterns, isFunction, isGEOrdered, isGTOrdered, isIndeterminate, isInfinity, isInteger, isIntegerResult, isLEOrdered, isList, isListOfLists, isLog, isLTOrdered, isMatrix, isMember, isMember, isMinusOne, isModule, isNegativeInfinity, isNegativeResult, isNonNegativeResult, isNot, isNumber, isNumEqualInteger, isNumEqualRational, isNumeric, isNumericFunction, isNumericMode, isNumIntValue, isOne, isONE, isOr, isOrderlessAST, isPattern, isPatternDefault, isPatternExpr, isPatternSequence, isPi, isPlus, isPlusTimesPower, isPolynomial, isPolynomial, isPolynomialOfMaxDegree, isPositiveResult, isPower, isPresent, isRational, isRationalResult, isRationalValue, isRealResult, isRuleAST, isSame, isSame, isSequence, isSignedNumber, isSin, isSinh, isSlot, isSlotSequence, isSpan, isSymbol, isTan, isTanh, isTimes, isTrue, isUnit, isValue, isVariable, isVector, isZERO, leafCount, leaves, minus, mod, multiply, multiply, negative, ofNullable, optional, or, orElse, orElseGet, orElseThrow, plus, power, power, reciprocal, replaceAll, replaceAll, replacePart, replaceRepeated, replaceRepeated, replaceSlots, signum, subtract, sum, times, timesDistributed, topHead, variables2Slots
IRational abs()
abs
in interface edu.jas.structure.AbelianGroupElem<IExpr>
IInteger ceil()
int compareInt(int value)
boolean equalsFraction(int numerator, int denominator)
numerator/denominator
number.
GCD(numerator, /denominator)
should be 1;numerator
- the numeratordenominator
- the denominatorIAST factorInteger()
factorInteger(-4) ==> {{-1,1},{2,2}}
IInteger floor()
java.math.BigInteger getBigDenominator()
java.math.BigInteger getBigNumerator()
IInteger getDenominator()
org.apache.commons.math4.fraction.BigFraction getFraction()
BigFraction
number.this
number s big fraction.IInteger getNumerator()
IRational negate()
ISignedNumber
negate
in interface edu.jas.structure.AbelianGroupElem<IExpr>
negate
in interface org.apache.commons.math4.FieldElement<IExpr>
negate
in interface ISignedNumber
INumber normalize()
IRational pow(long exp) throws java.lang.ArithmeticException
exp
- the exponent.thisexp
java.lang.ArithmeticException
- if 0^0
is given.