Package coneforest.psylla.core
Class PsyReal
- java.lang.Object
-
- coneforest.psylla.core.PsyReal
-
- All Implemented Interfaces:
PsyAdditive<PsyNumeric>,PsyArithmetic<PsyNumeric>,PsyAtomic,PsyConvertableToInteger,PsyConvertableToName,PsyConvertableToReal,PsyConvertableToString,PsyNumeric,PsyObject,PsyRealNumeric,PsyScalar<PsyRealNumeric>
public class PsyReal extends Object implements PsyRealNumeric
A representation of Ψ-realobject.
-
-
Field Summary
Fields Modifier and Type Field Description static PsyRealEstatic PsyRealMAX_VALUEstatic PsyRealMIN_VALUEstatic PsyRealMINUS_ONEstatic PsyRealNANstatic PsyRealONEstatic PsyRealPIstatic PsyRealTWOstatic PsyRealZERO-
Fields inherited from interface coneforest.psylla.core.PsyRealNumeric
OPERATORS
-
-
Constructor Summary
Constructors Constructor Description PsyReal(double value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubledoubleValue()booleanequals(Object object)inthashCode()intintValue()longlongValue()PsyRealpsyAbs()Returns a Ψ-numericabsolute value of this object.PsyNumericpsyAdd(PsyRealNumeric oNumeric)PsyRealpsyCeiling()PsyIntegerpsyCmp(PsyRealNumeric oNumeric)Compares this object against given object and returns a Ψ-integerindicating the result of the comparison.PsyRealpsyFloor()PsyBooleanpsyIsZero()Returns a Ψ-booleanindicating whether this object represents a zero value.PsyNumericpsyMul(PsyRealNumeric oNumeric)PsyRealpsyNeg()Returns a Ψ-additiverepresenting the result of arithmetic negation of this object.PsyIntegerpsyRound()PsyRealpsySignum()Returns the signum of this object.PsyNumericpsySub(PsyRealNumeric oNumeric)StringtoSyntaxString()-
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface coneforest.psylla.core.PsyArithmetic
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, psyDiv, psyEq, psyExp, psyGe, psyGt, psyHypot, psyLe, psyLog, psyLt, psyMul, psyPow, psyPow, psySin, psySinh, psySqrt, psySub, psyTan, psyTanh, psyToInteger, psyToReal, realValue
-
-
-
-
Field Detail
-
ZERO
public static final PsyReal ZERO
-
ONE
public static final PsyReal ONE
-
TWO
public static final PsyReal TWO
-
MINUS_ONE
public static final PsyReal MINUS_ONE
-
PI
public static final PsyReal PI
-
E
public static final PsyReal E
-
MAX_VALUE
public static final PsyReal MAX_VALUE
-
MIN_VALUE
public static final PsyReal MIN_VALUE
-
NAN
public static final PsyReal NAN
-
-
Method Detail
-
psyIsZero
public PsyBoolean psyIsZero()
Description copied from interface:PsyArithmeticReturns a Ψ-booleanindicating whether this object represents a zero value.- Specified by:
psyIsZeroin interfacePsyArithmetic<PsyNumeric>- Returns:
PsyBoolean.TRUEif this object represents a zero value, andPsyBoolean.FALSEotherwise.
-
intValue
public int intValue()
- Specified by:
intValuein interfacePsyRealNumeric
-
longValue
public long longValue()
- Specified by:
longValuein interfacePsyRealNumeric
-
doubleValue
public double doubleValue()
- Specified by:
doubleValuein interfacePsyRealNumeric
-
psyNeg
public PsyReal psyNeg()
Description copied from interface:PsyAdditiveReturns a Ψ-additiverepresenting the result of arithmetic negation of this object.- Specified by:
psyNegin interfacePsyAdditive<PsyNumeric>- Specified by:
psyNegin interfacePsyRealNumeric- Returns:
- a negation.
-
psyAbs
public PsyReal psyAbs()
Description copied from interface:PsyNumericReturns a Ψ-numericabsolute value of this object.- Specified by:
psyAbsin interfacePsyNumeric- Specified by:
psyAbsin interfacePsyRealNumeric- Returns:
- a Ψ-
numericabsolute value.
-
psySignum
public PsyReal psySignum()
Description copied from interface:PsyRealNumericReturns the signum of this object.- Specified by:
psySignumin interfacePsyRealNumeric- Returns:
- the Ψ-
realnumericsignum of this object.
-
psyAdd
public PsyNumeric psyAdd(PsyRealNumeric oNumeric)
- Specified by:
psyAddin interfacePsyRealNumeric
-
psySub
public PsyNumeric psySub(PsyRealNumeric oNumeric)
- Specified by:
psySubin interfacePsyRealNumeric
-
psyMul
public PsyNumeric psyMul(PsyRealNumeric oNumeric)
- Specified by:
psyMulin interfacePsyRealNumeric
-
psyRound
public PsyInteger psyRound()
- Specified by:
psyRoundin interfacePsyRealNumeric
-
psyFloor
public PsyReal psyFloor()
- Specified by:
psyFloorin interfacePsyRealNumeric
-
psyCeiling
public PsyReal psyCeiling()
- Specified by:
psyCeilingin interfacePsyRealNumeric
-
psyCmp
public PsyInteger psyCmp(PsyRealNumeric oNumeric)
Description copied from interface:PsyScalarCompares this object against given object and returns a Ψ-integerindicating 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:
psyCmpin interfacePsyScalar<PsyRealNumeric>- Parameters:
oNumeric- an object with which this object is compared.- Returns:
- a result of the comparison.
-
toSyntaxString
public String toSyntaxString()
- Specified by:
toSyntaxStringin interfacePsyObject
-
-