Package coneforest.psylla.core
Class PsyBigFractional
java.lang.Object
coneforest.psylla.core.PsyBigFractional
- All Implemented Interfaces:
PsyAdditive<PsyNumeric>
,PsyArithmetic<PsyNumeric>
,PsyAtomic
,PsyConvertableToInteger
,PsyConvertableToIntegral
,PsyConvertableToName
,PsyConvertableToReal
,PsyConvertableToString
,PsyMultiplicative<PsyNumeric>
,PsyNumeric
,PsyObject
,PsyRational
,PsyRealNumeric
,PsyScalar<PsyRealNumeric>
-
Field Summary
Fields inherited from interface coneforest.psylla.core.PsyRational
OPERATORS
-
Method Summary
Modifier and TypeMethodDescriptiondouble
int
intValue()
long
static PsyBigFractional
of
(BigInteger numerator, BigInteger denominator) psyAbs()
Returns anumeric
absolute value of this object.psyAdd
(PsyRealNumeric oRealNumeric) psyCmp
(PsyRealNumeric oRealNumeric) Compares this object against given object and returns aninteger
indicating the result of the comparison.psyDiv
(PsyRealNumeric oRealNumeric) psyFloor()
Returns aboolean
indicating whether this object represents a zero value.psyMul
(PsyRealNumeric oRealNumeric) psyNeg()
Returns anadditive
representing the result of arithmetic negation of this object.psyRound()
Returns the signum of this object.psySub
(PsyRealNumeric oRealNumeric) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface coneforest.psylla.core.PsyAdditive
psyNotZero
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, typeName
Methods inherited from interface coneforest.psylla.core.PsyRealNumeric
imagValue, psyAcos, psyAdd, psyAsin, psyAtan, psyCbrt, psyCos, psyCosh, psyDiv, psyEq, psyExp, psyGe, psyGt, psyHypot, psyLe, psyLog, psyLt, psyMul, psyPow, psyPow, psySin, psySinh, psySqrt, psySub, psyTan, psyTanh, psyToInteger, psyToReal, realValue
-
Method Details
-
of
-
doubleValue
public double doubleValue()- Specified by:
doubleValue
in interfacePsyRealNumeric
-
longValue
public long longValue()- Specified by:
longValue
in interfacePsyRealNumeric
-
bigIntegerValue
- Specified by:
bigIntegerValue
in interfacePsyRational
-
psyNumerator
- Specified by:
psyNumerator
in interfacePsyRational
-
psyDenominator
- Specified by:
psyDenominator
in interfacePsyRational
-
intValue
public int intValue()- Specified by:
intValue
in interfacePsyRealNumeric
-
psyCeiling
- Specified by:
psyCeiling
in interfacePsyRealNumeric
-
psyFloor
- Specified by:
psyFloor
in interfacePsyRealNumeric
-
psyIsZero
Description copied from interface:PsyAdditive
Returns aboolean
indicating whether this object represents a zero value.- Specified by:
psyIsZero
in interfacePsyAdditive<PsyNumeric>
- Returns:
PsyBoolean.TRUE
if this object represents a zero value, andPsyBoolean.FALSE
otherwise.
-
psyToIntegral
- Specified by:
psyToIntegral
in interfacePsyConvertableToIntegral
-
psyCmp
Description copied from interface:PsyScalar
Compares this object against given object and returns aninteger
indicating the result of the comparison. Returns negative value if this object is less than given one, zero if this object is equal to given one, and positive value if this object is greater than given one.- Specified by:
psyCmp
in interfacePsyScalar<PsyRealNumeric>
- Parameters:
oRealNumeric
- an object with which this object is compared.- Returns:
- a result of the comparison.
-
psyRound
- Specified by:
psyRound
in interfacePsyRealNumeric
-
psyAbs
Description copied from interface:PsyNumeric
Returns anumeric
absolute value of this object.- Specified by:
psyAbs
in interfacePsyNumeric
- Specified by:
psyAbs
in interfacePsyRealNumeric
- Returns:
- a
numeric
absolute value.
-
psyMul
- Specified by:
psyMul
in interfacePsyRealNumeric
-
psyDiv
- Specified by:
psyDiv
in interfacePsyRealNumeric
-
psyAdd
- Specified by:
psyAdd
in interfacePsyRealNumeric
-
psySub
- Specified by:
psySub
in interfacePsyRealNumeric
-
psyNeg
Description copied from interface:PsyAdditive
Returns anadditive
representing the result of arithmetic negation of this object.- Specified by:
psyNeg
in interfacePsyAdditive<PsyNumeric>
- Specified by:
psyNeg
in interfacePsyRealNumeric
- Returns:
- a negation.
-
psySignum
Description copied from interface:PsyRealNumeric
Returns the signum of this object.- Specified by:
psySignum
in interfacePsyRealNumeric
- Returns:
- the
realnumeric
signum of this object.
-
toSyntaxString
- Specified by:
toSyntaxString
in interfacePsyObject
-