# Class ApfloatCalculatorImpl

java.lang.Object
org.apfloat.calc.AbstractCalculatorImpl
org.apfloat.calc.FunctionCalculatorImpl
org.apfloat.calc.ApfloatCalculatorImpl

All Implemented Interfaces:
  `Serializable, CalculatorImpl`

public class ApfloatCalculatorImpl extends FunctionCalculatorImpl
Arbitrary precision calculator implementation.

Version:
  1.15.0
Author:
  Mikko Tommila
See Also:
  - Serialized Form

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from class FunctionCalculatorImpl

  `FunctionCalculatorImpl.FixedFunction, FunctionCalculatorImpl.FixedFunctionHandler, FunctionCalculatorImpl.Function, FunctionCalculatorImpl.Functions`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ApfloatCalculatorImpl()`
  Default constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `format(Number x)`
  Convert a number to a String.
  `protected FunctionCalculatorImpl.Functions`
  `getFunctions(Number x)`
  Get the function implementations.
  `Number`
  `parseDecimal(String value)`
  Parse a string to a floating-point number.
  `Number`
  `parseInteger(String value)`
  Parse a string to an integer number.
  `protected Number`
  `promote(Number x)`
  Promote a number to a more specific class.
  `void`
  `setInputPrecision(Long inputPrecision)`
  Set a fixed input precision.

  ### Methods inherited from class FunctionCalculatorImpl

  `fixedFunction, fixedFunction, function, setFunction`

  ### Methods inherited from class AbstractCalculatorImpl

  `add, divide, doubleFactorial, factorial, getFormat, getInputPrecision, getVariable, mod, multiply, negate, pow, setFormat, setVariable, subtract`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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.