- All Superinterfaces:
Comparable<PsyRealNumeric>,PsyAdditive<PsyNumeric>,PsyArithmetic<PsyNumeric>,PsyAtomic,PsyConvertableToInteger,PsyConvertableToIntegral,PsyConvertableToRational,PsyConvertableToReal,PsyMultiplicative<PsyNumeric>,PsyNumeric,PsyObject,PsyRealNumeric,PsyScalar<PsyRealNumeric>
- All Known Subinterfaces:
PsyIntegral
- All Known Implementing Classes:
PsyBigFraction,PsyBigInteger,PsyFraction,PsyInteger
@Type("rational")
public sealed interface PsyRational
extends PsyRealNumeric
permits PsyIntegral, PsyFraction, PsyBigFraction
The representation of
rational.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextActionContext action of thedenominatoroperator.static final ContextActionContext action of thenumeratoroperator.Fields inherited from interface coneforest.psylla.core.PsyAdditive
PSY_ADD, PSY_ISZERO, PSY_NEG, PSY_NONZERO, PSY_SUBFields inherited from interface coneforest.psylla.core.PsyConvertableToInteger
PSY_TOINTEGERFields inherited from interface coneforest.psylla.core.PsyConvertableToIntegral
PSY_TOINTEGRALFields inherited from interface coneforest.psylla.core.PsyConvertableToRational
PSY_TORATIONALFields inherited from interface coneforest.psylla.core.PsyConvertableToReal
PSY_TOREALFields inherited from interface coneforest.psylla.core.PsyMultiplicative
PSY_DIV, PSY_MUL, PSY_RECIPROCALFields inherited from interface coneforest.psylla.core.PsyNumeric
PSY_ABS, PSY_ACOS, PSY_ASIN, PSY_ATAN, PSY_CBRT, PSY_COS, PSY_COSH, PSY_EXP, PSY_LOG, PSY_POW, PSY_SIGNUM, PSY_SIN, PSY_SINH, PSY_SQRT, PSY_TAN, PSY_TANHFields inherited from interface coneforest.psylla.core.PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TONAME, PSY_TOSTRING, PSY_TYPEFields inherited from interface coneforest.psylla.core.PsyRealNumeric
PSY_CEILING, PSY_FLOOR, PSY_HYPOT, PSY_ROUND -
Method Summary
Modifier and TypeMethodDescriptiondefault intcompareTo(PsyRealNumeric oNumeric) static PsyRationalof(PsyIntegral oNumerator, PsyIntegral oDenominator) static PsyRationalparseLiteral(String image) default PsyRationalpsyAbs()Returns thenumericabsolute value of this object.default PsyRealNumericpsyAdd(PsyRealNumeric oRealNumeric) Returns anintegraldenominator of this fraction.default PsyRealNumericpsyDiv(PsyRealNumeric oRealNumeric) psyFloor()default PsyRealNumericpsyMul(PsyRealNumeric oRealNumeric) default PsyRationalpsyNeg()Returns theadditiveresult of arithmetic negation of this object.Returns anintegralnumerator of this fraction.default PsyRationaldefault PsyRealNumericpsySub(PsyRealNumeric oRealNumeric) default PsyRationaldefault PsyRationalMethods inherited from interface coneforest.psylla.core.PsyAdditive
psyIsZero, psyNonZeroMethods inherited from interface coneforest.psylla.core.PsyConvertableToIntegral
psyToIntegralMethods inherited from interface coneforest.psylla.core.PsyNumeric
psySignumMethods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, toSyntaxString, typeNameMethods inherited from interface coneforest.psylla.core.PsyRealNumeric
doubleValue, imagValue, intValue, longValue, psyAcos, psyAdd, psyAsin, psyAtan, psyCbrt, psyCos, psyCosh, psyDiv, psyEq, psyExp, psyHypot, psyLog, psyMul, psyPow, psyPow, psyRound, psySin, psySinh, psySqrt, psySub, psyTan, psyTanh, psyToInteger, psyToReal, realValue
-
Field Details
-
PSY_NUMERATOR
Context action of thenumeratoroperator. -
PSY_DENOMINATOR
Context action of thedenominatoroperator.
-
-
Method Details
-
bigIntegerValue
BigInteger bigIntegerValue() -
rationalValue
- Specified by:
rationalValuein interfacePsyRealNumeric
-
psyNumerator
PsyIntegral psyNumerator()Returns anintegralnumerator of this fraction.- Returns:
- the numerator.
-
psyDenominator
PsyIntegral psyDenominator()Returns anintegraldenominator of this fraction.- Returns:
- the denominator.
-
psyToRational
- Specified by:
psyToRationalin interfacePsyConvertableToRational- Specified by:
psyToRationalin interfacePsyRealNumeric
-
psyNeg
Description copied from interface:PsyAdditiveReturns theadditiveresult of arithmetic negation of this object.- Specified by:
psyNegin interfacePsyAdditive<PsyNumeric>- Specified by:
psyNegin interfacePsyRealNumeric- Returns:
- the
additiveresult of arithmetic negation.
-
psyAdd
- Specified by:
psyAddin interfacePsyRealNumeric
-
psySub
- Specified by:
psySubin interfacePsyRealNumeric
-
psyReciprocal
- Specified by:
psyReciprocalin interfacePsyMultiplicative<PsyNumeric>- Throws:
PsyUndefinedResultException
-
psyMul
- Specified by:
psyMulin interfacePsyRealNumeric
-
psyDiv
- Specified by:
psyDivin interfacePsyRealNumeric- Throws:
PsyUndefinedResultException
-
psyCeiling
PsyIntegral psyCeiling()- Specified by:
psyCeilingin interfacePsyRealNumeric
-
psyAbs
Description copied from interface:PsyNumericReturns thenumericabsolute value of this object.- Specified by:
psyAbsin interfacePsyNumeric- Specified by:
psyAbsin interfacePsyRealNumeric- Returns:
- the
numericabsolute value.
-
psyFloor
PsyIntegral psyFloor()- Specified by:
psyFloorin interfacePsyRealNumeric
-
of
-
compareTo
- Specified by:
compareToin interfaceComparable<PsyRealNumeric>- Specified by:
compareToin interfacePsyRealNumeric- Specified by:
compareToin interfacePsyScalar<PsyRealNumeric>
-
parseLiteral
static PsyRational parseLiteral(String image) throws PsySyntaxErrorException, PsyUndefinedResultException
-