java.lang.Object
de.tilman_neumann.jml.transcendental.Pi

public class Pi
extends java.lang.Object
Computations of Pi = 3.1415... to arbitrary precision.
  • Constructor Summary

    Constructors
    Constructor Description
    Pi()  
  • Method Summary

    Modifier and Type Method Description
    static void main​(java.lang.String[] argv)
    Test.
    static java.math.BigDecimal pi​(Scale scale)
    Compute Pi using the approximation formula found by Plouffe and the Borwein brothers also used in mpfr.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Pi

      public Pi()
  • Method Details

    • pi

      public static java.math.BigDecimal pi​(Scale scale)
      Compute Pi using the approximation formula found by Plouffe and the Borwein brothers also used in mpfr. The result is accurate to at least scale decimal after-floating point digits.
      Parameters:
      scale - Wanted precision in decimal after-floating point digits
      Returns:
      PI = 3.1415...
    • main

      public static void main​(java.lang.String[] argv)
      Test.
      Parameters:
      argv - command line arguments, ignored