java.lang.Object
coneforest.psylla.core.PsyFraction
- All Implemented Interfaces:
PsyAdditive<PsyNumeric>
,PsyArithmetic<PsyNumeric>
,PsyConvertableToInteger
,PsyConvertableToIntegral
,PsyConvertableToRational
,PsyConvertableToReal
,PsyMultiplicative<PsyNumeric>
,PsyNumeric
,PsyObject
,PsyRational
,PsyRealNumeric
,PsyScalar<PsyRealNumeric>
,PsyValue
,Comparable<PsyRealNumeric>
The representation of
fraction
.-
Field Summary
Fields inherited from interface coneforest.psylla.core.PsyAdditive
PSY_ADD, PSY_ISZERO, PSY_NEG, PSY_NONZERO, PSY_SUB
Fields inherited from interface coneforest.psylla.core.PsyConvertableToInteger
PSY_TOINTEGER
Fields inherited from interface coneforest.psylla.core.PsyConvertableToIntegral
PSY_TOINTEGRAL
Fields inherited from interface coneforest.psylla.core.PsyConvertableToRational
PSY_TORATIONAL
Fields inherited from interface coneforest.psylla.core.PsyConvertableToReal
PSY_TOREAL
Fields inherited from interface coneforest.psylla.core.PsyMultiplicative
PSY_DIV, PSY_MUL, PSY_RECIPROCAL
Fields 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_TANH
Fields inherited from interface coneforest.psylla.core.PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TOSTRING, PSY_TOSTRINGBUFFER, PSY_TYPE
Fields inherited from interface coneforest.psylla.core.PsyRational
PSY_DENOMINATOR, PSY_GCD, PSY_IDIV, PSY_LCM, PSY_MOD, PSY_NUMERATOR
Fields inherited from interface coneforest.psylla.core.PsyRealNumeric
PSY_CEILING, PSY_FLOOR, PSY_HYPOT, PSY_ROUND
-
Method Summary
Modifier and TypeMethodDescriptiondouble
int
intValue()
boolean
isZero()
long
static PsyRational
of
(long numerator, long denominator) Returns anintegral
denominator of this fraction.psyFloor()
Returns anintegral
numerator of this fraction.Returns thenumeric
signum of this object.Returns the syntactic representation of this object.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface coneforest.psylla.core.PsyAdditive
psyIsZero, psyNonZero
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToString, psyToStringBuffer, psyType, typeName
Methods inherited from interface coneforest.psylla.core.PsyRational
compareTo, psyAbs, psyAdd, psyDiv, psyGCD, psyIdiv, psyLCM, psyMod, psyMul, psyNeg, psyReciprocal, psyRound, psySub, psyToIntegral, psyToRational, rationalValue
Methods inherited from interface coneforest.psylla.core.PsyRealNumeric
imagValue, psyAcos, psyAdd, psyAsin, psyAtan, psyCbrt, psyCos, psyCosh, psyDiv, psyEq, psyExp, psyHypot, psyLog, psyMul, psyPow, psyPow, psySin, psySinh, psySqrt, psySub, psyTan, psyTanh, psyToInteger, psyToReal, realValue
-
Method Details
-
of
-
doubleValue
public double doubleValue()- Specified by:
doubleValue
in interfacePsyRealNumeric
-
bigIntegerValue
- Specified by:
bigIntegerValue
in interfacePsyRational
-
longValue
public long longValue()- Specified by:
longValue
in interfacePsyRealNumeric
-
intValue
public int intValue()- Specified by:
intValue
in interfacePsyRealNumeric
-
psyNumerator
Description copied from interface:PsyRational
Returns anintegral
numerator of this fraction.- Specified by:
psyNumerator
in interfacePsyRational
- Returns:
- an
integral
numerator of this fraction
-
psyDenominator
Description copied from interface:PsyRational
Returns anintegral
denominator of this fraction.- Specified by:
psyDenominator
in interfacePsyRational
- Returns:
- an
integral
denominator of this fraction
-
psyFloor
- Specified by:
psyFloor
in interfacePsyRational
- Specified by:
psyFloor
in interfacePsyRealNumeric
-
psyCeiling
- Specified by:
psyCeiling
in interfacePsyRational
- Specified by:
psyCeiling
in interfacePsyRealNumeric
-
isZero
public boolean isZero()- Specified by:
isZero
in interfacePsyAdditive<PsyNumeric>
-
psySignum
Description copied from interface:PsyNumeric
Returns thenumeric
signum of this object.- Specified by:
psySignum
in interfacePsyNumeric
- Returns:
- the
numeric
signum of this object
-
toSyntaxString
Description copied from interface:PsyObject
Returns the syntactic representation of this object.- Specified by:
toSyntaxString
in interfacePsyObject
- Returns:
- the syntactic representation of this object
-