# Class Pi.BorweinPiCalculator

java.lang.Object
org.apfloat.samples.Pi.BorweinPiCalculator

All Implemented Interfaces:
  `Serializable, Operation<Apfloat>`

Enclosing class:
  `Pi`

public static class Pi.BorweinPiCalculator extends Object implements Operation<Apfloat>
Calculates pi using the Borweins' quartic algorithm.

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BorweinPiCalculator(long precision, int radix)`
  Construct a pi calculator with the specified precision and radix.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Apfloat`
  `execute()`
  Calculate pi using the Borweins' quartic iteration.

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### BorweinPiCalculator

    public BorweinPiCalculator(long precision, int radix)
    Construct a pi calculator with the specified precision and radix.
    Parameters:
      `precision` - The target precision.
      `radix` - The radix to be used.

- ## Method Details

  - ### execute

    public Apfloat execute()
    Calculate pi using the Borweins' quartic iteration.
    Specified by:
      `execute` in interface `Operation<Apfloat>`
    Returns:
      Return value of the operation.