Class Pi
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
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
Compute Pi using the approximation formula found by Plouffe and the Borwein brothers also used in mpfr. The result is accurate to at leastscale
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
-