- All Superinterfaces:
PsyAdditive<PsyNumeric>
,PsyArithmetic<PsyNumeric>
,PsyAtomic
,PsyConvertableToInteger
,PsyConvertableToIntegral
,PsyConvertableToReal
,PsyMultiplicative<PsyNumeric>
,PsyNumeric
,PsyObject
,PsyScalar<PsyRealNumeric>
- All Known Subinterfaces:
PsyIntegral
,PsyRational
- All Known Implementing Classes:
PsyBigFraction
,PsyBigInteger
,PsyFraction
,PsyInteger
,PsyReal
@Type("realnumeric")
public sealed interface PsyRealNumeric
extends PsyNumeric, PsyConvertableToInteger, PsyConvertableToIntegral, PsyConvertableToReal, PsyScalar<PsyRealNumeric>
permits PsyRational, PsyReal
The representation of
realnumeric
, an abstraction of real number.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextAction
Context action of theceiling
operator.static final ContextAction
Context action of thefloor
operator.static final ContextAction
Context action of thehypot
operator.static final ContextAction
Context action of theround
operator.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.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_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_TONAME, PSY_TOSTRING, PSY_TYPE
-
Method Summary
Modifier and TypeMethodDescriptionint
cmp
(PsyRealNumeric oRealNumeric) double
default double
Returns the real part of this object.int
intValue()
long
psyAbs()
Returns anumeric
absolute value of this object.default PsyReal
psyAcos()
Returns anumeric
representing the arc cosine of this object.default PsyNumeric
psyAdd
(PsyNumeric oNumber) Returns anadditive
representing the result of arithmetic addition of given object to this object.psyAdd
(PsyRealNumeric oNumber) default PsyReal
psyAsin()
Returns anumeric
representing the arc sine of this object.default PsyReal
psyAtan()
Returns anumeric
representing the arc tangent of this object.default PsyReal
psyCbrt()
Returns anumeric
representing the cubic root of this object.default PsyInteger
psyCmp
(PsyRealNumeric oRealNumeric) Compares this object against given object and returns aninteger
indicating the result of the comparison.default PsyReal
psyCos()
Returns anumeric
representing the cosine of this object.default PsyReal
psyCosh()
Returns anumeric
representing the hyperbolic cosine of this object.default PsyNumeric
psyDiv
(PsyNumeric oNumeric) Returns a result of arithmetic division of this object by given object.psyDiv
(PsyRealNumeric oRealNumeric) default PsyBoolean
default PsyReal
psyExp()
Returns anumeric
representing the exponent of this object.psyFloor()
default PsyBoolean
psyGe
(PsyRealNumeric oRealNumeric) The “greater or equal” arithmetic comparison.default PsyBoolean
psyGt
(PsyRealNumeric oRealNumeric) The “greater” arithmetic comparison.default PsyReal
psyHypot
(PsyRealNumeric oRealNumeric) default PsyBoolean
psyLe
(PsyRealNumeric oRealNumeric) The “less or equal” arithmetic comparison.default PsyReal
psyLog()
Returns anumeric
representing the natural logarithm of this object.default PsyBoolean
psyLt
(PsyRealNumeric oRealNumeric) The “less” arithmetic comparison.default PsyNumeric
psyMul
(PsyNumeric oNumber) Returns a result of arithmetic multiplication of given object by this object.psyMul
(PsyRealNumeric oNumber) psyNeg()
Returns anadditive
representing the result of arithmetic negation of this object.default PsyNumeric
psyPow
(PsyNumeric oNumber) default PsyReal
psyPow
(PsyRealNumeric oNumber) psyRound()
default PsyReal
psySin()
Returns anumeric
representing the sine of this object.default PsyReal
psySinh()
Returns anumeric
representing the hyperbolic sine of this object.default PsyReal
psySqrt()
Returns anumeric
representing the square root of this object.default PsyNumeric
psySub
(PsyNumeric oNumber) Returns anadditive
representing the result of arithmetic subtraction of given object from this object.psySub
(PsyRealNumeric oNumber) default PsyReal
psyTan()
Returns anumeric
representing the tangent of this object.default PsyReal
psyTanh()
Returns anumeric
representing the hyperbolic tangent of this object.default PsyInteger
default PsyReal
default double
Returns the real part of this object.Methods inherited from interface coneforest.psylla.core.PsyAdditive
psyIsZero, psyNonZero
Methods inherited from interface coneforest.psylla.core.PsyConvertableToIntegral
psyToIntegral
Methods inherited from interface coneforest.psylla.core.PsyMultiplicative
psyReciprocal
Methods inherited from interface coneforest.psylla.core.PsyNumeric
psySignum
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, toSyntaxString, typeName
-
Field Details
-
PSY_CEILING
Context action of theceiling
operator. -
PSY_FLOOR
Context action of thefloor
operator. -
PSY_HYPOT
Context action of thehypot
operator. -
PSY_ROUND
Context action of theround
operator.
-
-
Method Details
-
intValue
int intValue() -
longValue
long longValue() -
doubleValue
double doubleValue() -
realValue
default double realValue()Description copied from interface:PsyNumeric
Returns the real part of this object.- Specified by:
realValue
in interfacePsyNumeric
- Returns:
- the real part.
-
imagValue
default double imagValue()Description copied from interface:PsyNumeric
Returns the real part of this object.- Specified by:
imagValue
in interfacePsyNumeric
- Returns:
- the imaginary part.
-
psyToInteger
- Specified by:
psyToInteger
in interfacePsyConvertableToInteger
- Throws:
PsyRangeCheckException
-
psyToReal
- Specified by:
psyToReal
in interfacePsyConvertableToReal
-
psyNeg
PsyRealNumeric psyNeg()Description copied from interface:PsyAdditive
Returns anadditive
representing the result of arithmetic negation of this object.- Specified by:
psyNeg
in interfacePsyAdditive<PsyNumeric>
- Returns:
- a negation.
-
psyAdd
-
psyAdd
Description copied from interface:PsyAdditive
Returns anadditive
representing the result of arithmetic addition of given object to this object.- Specified by:
psyAdd
in interfacePsyAdditive<PsyNumeric>
- Parameters:
oNumber
- given object.- Returns:
- a sum.
-
psySub
-
psySub
Description copied from interface:PsyAdditive
Returns anadditive
representing the result of arithmetic subtraction of given object from this object.- Specified by:
psySub
in interfacePsyAdditive<PsyNumeric>
- Parameters:
oNumber
- given object.- Returns:
- a difference.
-
psyMul
-
psyMul
Description copied from interface:PsyMultiplicative
Returns a result of arithmetic multiplication of given object by this object.- Specified by:
psyMul
in interfacePsyMultiplicative<PsyNumeric>
- Parameters:
oNumber
- a given object.- Returns:
- a product.
-
psyDiv
- Throws:
PsyUndefinedResultException
-
psyDiv
Description copied from interface:PsyMultiplicative
Returns a result of arithmetic division of this object by given object.- Specified by:
psyDiv
in interfacePsyMultiplicative<PsyNumeric>
- Parameters:
oNumeric
- a given object.- Returns:
- a fraction.
- Throws:
PsyUndefinedResultException
- when the result of division is not defined.
-
psyPow
-
psyPow
- Specified by:
psyPow
in interfacePsyNumeric
-
psyAbs
PsyRealNumeric psyAbs()Description copied from interface:PsyNumeric
Returns anumeric
absolute value of this object.- Specified by:
psyAbs
in interfacePsyNumeric
- Returns:
- a
numeric
absolute value.
-
psySqrt
Description copied from interface:PsyNumeric
Returns anumeric
representing the square root of this object.- Specified by:
psySqrt
in interfacePsyNumeric
- Returns:
- a
numeric
square root of this number.
-
psyCbrt
Description copied from interface:PsyNumeric
Returns anumeric
representing the cubic root of this object.- Specified by:
psyCbrt
in interfacePsyNumeric
- Returns:
- a
numeric
cubic root of this number.
-
psyExp
Description copied from interface:PsyNumeric
Returns anumeric
representing the exponent of this object.- Specified by:
psyExp
in interfacePsyNumeric
- Returns:
- a
numeric
exponent.
-
psyLog
Description copied from interface:PsyNumeric
Returns anumeric
representing the natural logarithm of this object.- Specified by:
psyLog
in interfacePsyNumeric
- Returns:
- a
numeric
logarithm.
-
psyCos
Description copied from interface:PsyNumeric
Returns anumeric
representing the cosine of this object.- Specified by:
psyCos
in interfacePsyNumeric
- Returns:
- a
numeric
cosine.
-
psySin
Description copied from interface:PsyNumeric
Returns anumeric
representing the sine of this object.- Specified by:
psySin
in interfacePsyNumeric
- Returns:
- a
numeric
sine.
-
psyTan
Description copied from interface:PsyNumeric
Returns anumeric
representing the tangent of this object.- Specified by:
psyTan
in interfacePsyNumeric
- Returns:
- a
numeric
tangent.
-
psyCosh
Description copied from interface:PsyNumeric
Returns anumeric
representing the hyperbolic cosine of this object.- Specified by:
psyCosh
in interfacePsyNumeric
- Returns:
- a
numeric
hyperbolic cosine of this number.
-
psySinh
Description copied from interface:PsyNumeric
Returns anumeric
representing the hyperbolic sine of this object.- Specified by:
psySinh
in interfacePsyNumeric
- Returns:
- a
numeric
hyperbolic sine of this number.
-
psyTanh
Description copied from interface:PsyNumeric
Returns anumeric
representing the hyperbolic tangent of this object.- Specified by:
psyTanh
in interfacePsyNumeric
- Returns:
- a
numeric
hyperbolic tangent of this number.
-
psyAcos
Description copied from interface:PsyNumeric
Returns anumeric
representing the arc cosine of this object.- Specified by:
psyAcos
in interfacePsyNumeric
- Returns:
- a
numeric
arc cosine.
-
psyAsin
Description copied from interface:PsyNumeric
Returns anumeric
representing the arc sine of this object.- Specified by:
psyAsin
in interfacePsyNumeric
- Returns:
- a
numeric
arc sine.
-
psyAtan
Description copied from interface:PsyNumeric
Returns anumeric
representing the arc tangent of this object.- Specified by:
psyAtan
in interfacePsyNumeric
- Returns:
- a
numeric
arc tangent.
-
psyHypot
-
psyFloor
PsyRealNumeric psyFloor() -
psyCeiling
PsyRealNumeric psyCeiling() -
psyRound
PsyRealNumeric psyRound() -
psyEq
-
cmp
-
psyLt
The “less” arithmetic comparison.- Specified by:
psyLt
in interfacePsyScalar<PsyRealNumeric>
- Parameters:
oRealNumeric
- an object with which this object is compared.- Returns:
- a
boolean
value indicating if this object is less than given object.
-
psyLe
The “less or equal” arithmetic comparison.- Specified by:
psyLe
in interfacePsyScalar<PsyRealNumeric>
- Parameters:
oRealNumeric
- an object with which this object is compared.- Returns:
- a
boolean
value indicating if this object is less than or equal to given object.
-
psyGt
The “greater” arithmetic comparison.- Specified by:
psyGt
in interfacePsyScalar<PsyRealNumeric>
- Parameters:
oRealNumeric
- an object with which this object is compared.- Returns:
- a
boolean
result of comparison.
-
psyGe
The “greater or equal” arithmetic comparison.- Specified by:
psyGe
in interfacePsyScalar<PsyRealNumeric>
- Parameters:
oRealNumeric
- an object with which this object is compared.- Returns:
- a
boolean
result of comparison.
-
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.
-