Class ApfloatCalculatorImpl

All Implemented Interfaces:
Serializable, CalculatorImpl

public class ApfloatCalculatorImpl extends FunctionCalculatorImpl
Arbitrary precision calculator implementation.
Version:
1.13.0
Author:
Mikko Tommila
See Also:
  • Constructor Details

    • ApfloatCalculatorImpl

      public ApfloatCalculatorImpl()
      Default constructor.
  • Method Details

    • parseInteger

      public Number parseInteger(String value)
      Description copied from interface: CalculatorImpl
      Parse a string to an integer number.
      Parameters:
      value - The string to parse.
      Returns:
      The number.
    • parseDecimal

      public Number parseDecimal(String value)
      Description copied from interface: CalculatorImpl
      Parse a string to a floating-point number.
      Parameters:
      value - The string to parse.
      Returns:
      The number.
    • format

      public String format(Number x)
      Description copied from interface: CalculatorImpl
      Convert a number to a String. The current formatting option is used.
      Parameters:
      x - The number.
      Returns:
      The String.
    • getFunctions

      protected FunctionCalculatorImpl.Functions getFunctions(Number x)
      Description copied from class: FunctionCalculatorImpl
      Get the function implementations.
      Specified by:
      getFunctions in class FunctionCalculatorImpl
      Parameters:
      x - The number to use as the function argument.
      Returns:
      The function implementations.
    • promote

      protected Number promote(Number x)
      Description copied from class: FunctionCalculatorImpl
      Promote a number to a more specific class.
      Specified by:
      promote in class FunctionCalculatorImpl
      Parameters:
      x - The argument.
      Returns:
      The argument, possibly converted to a more specific subclass.
    • setInputPrecision

      public void setInputPrecision(Long inputPrecision)
      Description copied from interface: CalculatorImpl
      Set a fixed input precision.
      Specified by:
      setInputPrecision in interface CalculatorImpl
      Overrides:
      setInputPrecision in class AbstractCalculatorImpl
      Parameters:
      inputPrecision - The precision if a fixed precision is used or null for arbitrary precision.