java.lang.Object
coneforest.psylla.core.PsyReal
- All Implemented Interfaces:
PsyAdditive<PsyNumeric>,PsyArithmetic<PsyNumeric>,PsyAtomic,PsyConvertableToInteger,PsyConvertableToIntegral,PsyConvertableToRational,PsyConvertableToReal,PsyMultiplicative<PsyNumeric>,PsyNumeric,PsyObject,PsyRealNumeric,PsyScalar<PsyRealNumeric>,Comparable<PsyRealNumeric>
The representation of
real.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PsyRealThe number e.static final PsyRealThe largest positive finite value, (2−−52)·21023.static final PsyRealThe smallest positive nonzero value, 2−1074.static final PsyRealThe number minus one.static final PsyRealThe Not-a-Number (NaN) value.static final PsyRealThe number one.static final PsyRealThe number π.static final PsyRealThe number two.static final PsyRealThe number zero.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 -
Constructor Summary
ConstructorsConstructorDescriptionPsyReal(double value) Creates a newrealrepresenting the specifieddoublevalue. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(PsyRealNumeric oNumeric) doublebooleaninthashCode()intintValue()longstatic PsyRealparseLiteral(String image) psyAbs()Returns thenumericabsolute value of this object.psyAdd(PsyRealNumeric oNumeric) psyDiv(PsyRealNumeric oRealNumeric) psyFloor()Returns abooleanindicating whether this object represents a zero value.psyMul(PsyRealNumeric oRealNumeric) psyNeg()Returns theadditiveresult of arithmetic negation of this object.psyRound()Returns thenumericsignum of this object.psySub(PsyRealNumeric oNumeric) Returns the syntactic representation of this object.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface coneforest.psylla.core.PsyAdditive
psyNonZeroMethods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, typeNameMethods 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, psyToRational, psyToReal, realValue
-
Field Details
-
ZERO
The number zero. -
ONE
The number one. -
TWO
The number two. -
MINUS_ONE
The number minus one. -
PI
The number π. -
E
The number e. -
MAX_VALUE
The largest positive finite value, (2−−52)·21023. -
MIN_VALUE
The smallest positive nonzero value, 2−1074. -
NAN
The Not-a-Number (NaN) value.
-
-
Constructor Details
-
PsyReal
public PsyReal(double value) Creates a newrealrepresenting the specifieddoublevalue.- Parameters:
value- adoublevalue.
-
-
Method Details
-
psyToIntegral
- Specified by:
psyToIntegralin interfacePsyConvertableToIntegral- Throws:
PsyRangeCheckException
-
psyIsZero
Description copied from interface:PsyAdditiveReturns abooleanindicating whether this object represents a zero value.- Specified by:
psyIsZeroin interfacePsyAdditive<PsyNumeric>- Returns:
- a
booleanindicating whether this object represents a zero value.
-
intValue
public int intValue()- Specified by:
intValuein interfacePsyRealNumeric
-
longValue
public long longValue()- Specified by:
longValuein interfacePsyRealNumeric
-
doubleValue
public double doubleValue()- Specified by:
doubleValuein interfacePsyRealNumeric
-
rationalValue
- Specified by:
rationalValuein interfacePsyRealNumeric- Throws:
PsyUndefinedResultException
-
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.
-
psyAbs
Description copied from interface:PsyNumericReturns thenumericabsolute value of this object.- Specified by:
psyAbsin interfacePsyNumeric- Specified by:
psyAbsin interfacePsyRealNumeric- Returns:
- the
numericabsolute value.
-
psySignum
Description copied from interface:PsyNumericReturns thenumericsignum of this object.- Specified by:
psySignumin interfacePsyNumeric- Returns:
- the
numericsignum.
-
psyAdd
- Specified by:
psyAddin interfacePsyRealNumeric
-
psySub
- Specified by:
psySubin interfacePsyRealNumeric
-
psyReciprocal
- Specified by:
psyReciprocalin interfacePsyMultiplicative<PsyNumeric>
-
psyMul
- Specified by:
psyMulin interfacePsyRealNumeric
-
psyDiv
- Specified by:
psyDivin interfacePsyRealNumeric
-
psyRound
- Specified by:
psyRoundin interfacePsyRealNumeric
-
psyFloor
- Specified by:
psyFloorin interfacePsyRealNumeric
-
psyCeiling
- Specified by:
psyCeilingin interfacePsyRealNumeric
-
compareTo
- Specified by:
compareToin interfaceComparable<PsyRealNumeric>- Specified by:
compareToin interfacePsyRealNumeric- Specified by:
compareToin interfacePsyScalar<PsyRealNumeric>
-
toSyntaxString
Description copied from interface:PsyObjectReturns the syntactic representation of this object.- Specified by:
toSyntaxStringin interfacePsyObject- Returns:
- the syntactic representation of this object.
-
hashCode
public int hashCode() -
equals
-
parseLiteral
-