Class BigDecVSum

All Implemented Interfaces:
FixedPrecisionFunctionI, ZeroLengthBehaviourI, PostfixMathCommandI, Serializable

public class BigDecVSum extends ArrayFunctionBase implements FixedPrecisionFunctionI
Sum function, expanding its arguments together. Uses BigDecimal.add(BigDecimal, MathContext) for calculating running totals. If the number of decimal places is set, then the final value is rounded to that number of decimal places.
Since:
Jep 4.1
See Also:
  • Field Details

    • mc

      protected MathContext mc
    • scale

      protected int scale
  • Constructor Details

    • BigDecVSum

      public BigDecVSum(MathContext mc)
      Constructor with a given MathContext
      Parameters:
      mc - MathContext to use
    • BigDecVSum

      public BigDecVSum(MathContext mc, int dp)
      Fixed-point constructor
      Parameters:
      mc - MathContext to use
      dp - number of decimal places to round final results to
  • Method Details