Class Pi
- java.lang.Object
-
- de.tilman_neumann.jml.transcendental.Pi
-
public class Pi extends Object
Computations of Pi = 3.1415... to arbitrary precision.- Author:
- Tilman Neumann
-
-
Constructor Summary
Constructors Constructor Description Pi()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
main(String[] argv)
Test.static BigDecimal
pi(Scale scale)
Compute Pi using the approximation formula found by Plouffe and the Borwein brothers also used in mpfr.
-
-
-
Method Detail
-
pi
public static 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 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(String[] argv)
Test.- Parameters:
argv
- command line arguments, ignored
-
-