Class BigDecSub
java.lang.Object
com.singularsys.jep.functions.PostfixMathCommand
com.singularsys.jep.functions.BinaryFunction
com.singularsys.jep.functions.Subtract
com.singularsys.jep.bigdecimal.functions.BigDecSub
- All Implemented Interfaces:
FixedPrecisionFunctionI,PostfixMathCommandI,RealBinaryFunction,Serializable
Subtraction function for BigDecimals, Double and other Number types.
Uses
BigDecimal.subtract(BigDecimal,MathContext).
Since Jep 4.1 can work with vectors.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.singularsys.jep.functions.BinaryFunction
BinaryFunction.BiFunctionWithException<T> -
Field Summary
FieldsFields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, description, name, NaN, numberOfParameters -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGets the number of decimal places used.voidsetDecimalPlaces(int scale) Sets the number of decimal places to use.voidMethods inherited from class com.singularsys.jep.functions.Subtract
eval, evaluate, sub, sub, sub, sub, subMethods inherited from class com.singularsys.jep.functions.BinaryFunction
instanceOf, instanceOf, instanceOf, instanceOf, runMethods inherited from class com.singularsys.jep.functions.PostfixMathCommand
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, asType, checkNumberOfParameters, getDescription, getDescription, getDescriptionWithType, getName, getNumberOfParameters, setCurNumberOfParameters, setDescription, setName, toString, toString
-
Field Details
-
mc
-
scale
protected int scale
-
-
Constructor Details
-
BigDecSub
- Parameters:
mc-
-
BigDecSub
-
-
Method Details
-
sub
- Overrides:
subin classSubtract- Throws:
EvaluationException
-
subVec
- Throws:
EvaluationException
-
getMathContext
-
setMathContext
-
setDecimalPlaces
public void setDecimalPlaces(int scale) Description copied from interface:FixedPrecisionFunctionISets the number of decimal places to use.- Specified by:
setDecimalPlacesin interfaceFixedPrecisionFunctionI- Parameters:
scale- either zero, a positive number or -1 for floating-point formats
-
getDecimalPlaces
public int getDecimalPlaces()Description copied from interface:FixedPrecisionFunctionIGets the number of decimal places used.- Specified by:
getDecimalPlacesin interfaceFixedPrecisionFunctionI- Returns:
- either zero, a positive number or -1 for floating-point formats
-