Package coneforest.psylla.core
Class PsyReal
java.lang.Object
coneforest.psylla.core.PsyReal
- All Implemented Interfaces:
PsyAdditive<PsyNumeric>
,PsyArithmetic<PsyNumeric>
,PsyAtomic
,PsyConvertableToInteger
,PsyConvertableToIntegral
,PsyConvertableToName
,PsyConvertableToReal
,PsyConvertableToString
,PsyMultiplicative<PsyNumeric>
,PsyNumeric
,PsyObject
,PsyRealNumeric
,PsyScalar<PsyRealNumeric>
A representation of
real
object.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PsyReal
static final PsyReal
static final PsyReal
static final PsyReal
static final PsyReal
static final PsyReal
static final PsyReal
static final PsyReal
static final PsyReal
Fields inherited from interface coneforest.psylla.core.PsyRealNumeric
OPERATORS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
boolean
int
hashCode()
int
intValue()
long
static PsyReal
parseLiteral
(String image) psyAbs()
Returns anumeric
absolute value of this object.psyAdd
(PsyRealNumeric oNumeric) psyCmp
(PsyRealNumeric oNumeric) Compares this object against given object and returns aninteger
indicating the result of the comparison.psyDiv
(PsyRealNumeric oNumeric) psyFloor()
Returns aboolean
indicating whether this object represents a zero value.psyMul
(PsyRealNumeric oNumeric) psyNeg()
Returns anadditive
representing the result of arithmetic negation of this object.psyRound()
Returns the signum of this object.psySub
(PsyRealNumeric oNumeric) Methods inherited from class java.lang.Object
getClass, 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
-
Field Details
-
ZERO
-
ONE
-
TWO
-
MINUS_ONE
-
PI
-
E
-
MAX_VALUE
-
MIN_VALUE
-
NAN
-
-
Constructor Details
-
PsyReal
public PsyReal(double value)
-
-
Method Details
-
psyToIntegral
- Specified by:
psyToIntegral
in interfacePsyConvertableToIntegral
- Throws:
PsyRangeCheckException
-
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.
-
intValue
public int intValue()- Specified by:
intValue
in interfacePsyRealNumeric
-
longValue
public long longValue()- Specified by:
longValue
in interfacePsyRealNumeric
-
doubleValue
public double doubleValue()- Specified by:
doubleValue
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.
-
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.
-
psySignum
Description copied from interface:PsyRealNumeric
Returns the signum of this object.- Specified by:
psySignum
in interfacePsyRealNumeric
- Returns:
- the
realnumeric
signum of this object.
-
psyAdd
- Specified by:
psyAdd
in interfacePsyRealNumeric
-
psySub
- Specified by:
psySub
in interfacePsyRealNumeric
-
psyMul
- Specified by:
psyMul
in interfacePsyRealNumeric
-
psyDiv
- Specified by:
psyDiv
in interfacePsyRealNumeric
-
psyRound
- Specified by:
psyRound
in interfacePsyRealNumeric
-
psyFloor
- Specified by:
psyFloor
in interfacePsyRealNumeric
-
psyCeiling
- Specified by:
psyCeiling
in interfacePsyRealNumeric
-
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:
oNumeric
- an object with which this object is compared.- Returns:
- a result of the comparison.
-
toSyntaxString
- Specified by:
toSyntaxString
in interfacePsyObject
-
hashCode
public int hashCode() -
equals
-
parseLiteral
-