public interface INumber extends IExpr
ASTID, BLANKID, COMPLEXID, DOUBLECOMPLEXID, DOUBLEID, FRACTIONID, INTEGERID, METHODSYMBOLID, PATTERNID, STRINGID, SYMBOLID
Modifier and Type | Method and Description |
---|---|
ApcomplexNum |
apcomplexNumValue(long precision)
Get a
Apcomplex number wrapped into an
ApcomplexNum object. |
INumber |
ceilFraction()
Returns the smallest (closest to negative infinity)
IInteger
value that is not less than this and is equal to a
mathematical integer. |
int |
compareAbsValueToOne()
Compare the absolute value of this number with
1 and return
1 , if the absolute value is greater than 1
0 , if the absolute value equals 1
-1 , if the absolute value is less than 1
|
ComplexNum |
complexNumValue()
Get a
ComplexNum number bject. |
int |
complexSign()
Gets the signum value of a complex number
|
INumber |
conjugate()
Conjugate this (complex-) number.
|
IExpr |
eabs()
Get the absolute value for a given number
|
boolean |
equalsInt(int i)
Check if this number equals the given
int number? |
INumber |
floorFraction()
Returns the largest (closest to positive infinity)
IInteger
value that is not greater than this and is equal to a
mathematical integer. |
ISignedNumber |
getIm()
Returns the imaginary part of a complex number
|
double |
getImaginary()
Returns the imaginary part of a complex number
|
ISignedNumber |
getRe()
Returns the real part of a complex number
|
double |
getReal()
Returns the real part of a complex number
|
INumber |
opposite()
Returns an
IExpr whose value is (-1) * this . |
$div, $minus, $plus, $times, $up, accept, accept, accept, accept, and, apply, apply, asType, compareTo, dec, divide, evalComplex, evalDouble, evalNumber, evalSignedNumber, evaluate, evaluateHead, fullFormString, getAt, getField, head, hierarchy, ifPresent, inc, internalFormString, internalJavaString, internalScalaString, inverse, isAllExpanded, isAnd, isArcCos, isArcCosh, isArcSin, isArcSinh, isArcTan, isArcTanh, isAST, isAST, isAST, isAST, isAST, isAST, isAST, isASTSizeGE, isAtom, isBlank, isComplex, isComplexInfinity, isComplexNumeric, isCondition, isConstant, isCos, isCosh, isDerivative, isDirectedInfinity, isE, isExpanded, isFalse, isFlatAST, isFraction, isFree, isFree, isFree, isFreeAST, isFreeAST, isFreeOfPatterns, isFunction, isGEOrdered, isGTOrdered, isIndeterminate, isInfinity, isInteger, isIntegerResult, isLEOrdered, isList, isListOfLists, isLog, isLTOrdered, isMatrix, isMember, isMember, isMinusOne, isModule, isNegative, isNegativeInfinity, isNegativeResult, isNonNegativeResult, isNot, isNumber, isNumEqualInteger, isNumEqualRational, isNumeric, isNumericFunction, isNumericMode, isNumIntValue, isOne, isONE, isOr, isOrderlessAST, isPattern, isPatternDefault, isPatternExpr, isPatternSequence, isPi, isPlus, isPlusTimesPower, isPolynomial, isPolynomial, isPolynomialOfMaxDegree, isPositive, isPositiveResult, isPower, isPresent, isRational, isRationalResult, isRationalValue, isRealResult, isRuleAST, isSame, isSame, isSequence, isSignedNumber, isSin, isSinh, isSlot, isSlotSequence, isSpan, isSymbol, isTan, isTanh, isTimes, isTrue, isUnit, isValue, isVariable, isVector, isZero, isZERO, leafCount, leaves, minus, mod, multiply, multiply, negative, ofNullable, optional, or, orElse, orElseGet, orElseThrow, plus, power, power, reciprocal, replaceAll, replaceAll, replacePart, replaceRepeated, replaceRepeated, replaceSlots, signum, subtract, sum, times, timesDistributed, topHead, variables2Slots
ApcomplexNum apcomplexNumValue(long precision)
Apcomplex
number wrapped into an
ApcomplexNum
object.precision
- set the precision of the resulting ApcomplexNumINumber ceilFraction() throws java.lang.ArithmeticException
IInteger
value that is not less than this
and is equal to a
mathematical integer. This method raises ArithmeticException
if a
numeric value cannot be represented by an long
type.IInteger
value that is not less than this
and is equal to a
mathematical integer.java.lang.ArithmeticException
int compareAbsValueToOne()
1
and return
1
, if the absolute value is greater than 10
, if the absolute value equals 1-1
, if the absolute value is less than 1ComplexNum complexNumValue()
ComplexNum
number bject.int complexSign()
this == 0
; +1 for
real(this) > 0
or
( real(this)==0 && imaginary(this) > 0 )
;
-1 for real(this) < 0 || ( real(this) == 0 &&
imaginary(this) < 0 )
INumber conjugate()
IExpr eabs()
boolean equalsInt(int i)
int
number?i
- the integer numberINumber floorFraction() throws java.lang.ArithmeticException
IInteger
value that is not greater than this
and is equal to a
mathematical integer. ArithmeticException
if a numeric value cannot
be represented by an long
type.IInteger
value that is not greater than this
and is equal to
a mathematical integer.java.lang.ArithmeticException
ISignedNumber getIm()
ISignedNumber getRe()
double getReal()
double getImaginary()
INumber opposite()
IExpr
IExpr
whose value is (-1) * this
.
Calculates F.eval(F.Times(F.CN1, this))
in the common case
and uses a specialized implementation for derived number classes.opposite
in interface IExpr
IExpr.negative()