org.matheclipse.core.interfaces
Interface INum
-
- All Superinterfaces:
- AbelianGroupElem<IExpr>, java.lang.Comparable<IExpr>, Element<IExpr>, IExpr, INumber, ISignedNumber, MonoidElem<IExpr>, RingElem<IExpr>, java.io.Serializable
- All Known Implementing Classes:
- Num
public interface INum extends ISignedNumber
A numeric (double) number.
-
-
Field Summary
-
Fields inherited from interface org.matheclipse.core.interfaces.IExpr
ASTID, COMPLEXID, DOUBLECOMPLEXID, DOUBLEID, FRACTIONID, INTEGERID, METHODSYMBOLID, PATTERNID, STRINGID, SYMBOLID
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description INumadd(INum val)doublegetRealPart()intintValue()Returns the value of this number as anint(by simply casting to typeint).booleanisNumIntValue()Check if this expression represents anintvalue.INummultiply(INum val)INumpow(INum val)inttoInt()Converts this double value to anintvalue; unlikeintValue()this method raisesArithmeticExceptionif this integer cannot be represented by aninttype.-
Methods inherited from interface org.matheclipse.core.interfaces.ISignedNumber
ceil, divideBy, doubleValue, floor, inverse, isGreaterThan, isLessThan, isNegative, isPositive, isZero, negate, opposite, round, sign, subtractFrom, toLong
-
Methods inherited from interface org.matheclipse.core.interfaces.INumber
complexSign, eabs, equalsInt, getIm, getRe
-
Methods inherited from interface org.matheclipse.core.interfaces.IExpr
accept, accept, accept, and, apply, apply, asType, compareTo, evaluate, fullFormString, getAt, head, hierarchy, internalFormString, isAnd, isArcCos, isArcCosh, isArcSin, isArcSinh, isArcTan, isArcTanh, isAST, isAST, isAST, isAST, isAST, isAST, isASTSizeGE, isAtom, isComplex, isComplexInfinity, isComplexNumeric, isCondition, isConstant, isCos, isCosh, isDirectedInfinity, isFalse, isFlatAST, isFraction, isFree, isFree, isFunction, isGEOrdered, isGTOrdered, isInfinity, isInteger, isLEOrdered, isList, isListOfLists, isLog, isLTOrdered, isMatrix, isMember, isMember, isMinusOne, isModule, isNegativeInfinity, isNot, isNumber, isNumEqualInteger, isNumeric, isNumericFunction, isOne, isOr, isOrderlessAST, isPattern, isPatternExpr, isPatternSequence, isPlus, isPower, isRational, isRealFunction, isRuleAST, isSame, isSame, isSequence, isSignedNumber, isSin, isSinh, isSlot, isSlotSequence, isSymbol, isTan, isTanh, isTimes, isTrue, isValue, isVector, leaves, minus, mod, multiply, negative, or, plus, power, power, replaceAll, replaceAll, replacePart, replaceRepeated, replaceRepeated, replaceSlots, signum, times, topHead, variables2Slots
-
Methods inherited from interface edu.jas.structure.AbelianGroupElem
abs, isZERO, subtract, sum
-
Methods inherited from interface edu.jas.structure.MonoidElem
divide, isONE, isUnit, remainder
-
-
-
-
Method Detail
-
getRealPart
double getRealPart()
-
isNumIntValue
boolean isNumIntValue()
Check if this expression represents anintvalue. The value of anINumobject can be anintvalue.- Specified by:
isNumIntValuein interfaceIExpr- Returns:
-
intValue
int intValue()
Returns the value of this number as anint(by simply casting to typeint).- Returns:
-
toInt
int toInt() throws java.lang.ArithmeticException
Converts this double value to anintvalue; unlikeintValue()this method raisesArithmeticExceptionif this integer cannot be represented by aninttype.- Specified by:
toIntin interfaceISignedNumber- Returns:
- the numeric value represented by this integer after conversion to
type
int. - Throws:
java.lang.ArithmeticException- if conversion tointis not possible.
-
-
DMelt 3.0 © DataMelt by jWork.ORG