@@ -0,0 +1,698 @@
+import java.util.function.Function;%0A%0Aclass PiMark %7B%0A  public static void main(String%5B%5D args)%0A  %7B%0A    for (int i = 0; i %3C 10; i++) System.out.println(pi(i));%0A  %7D%0A  %0A  public static double pi(int top)%0A  %7B%0A  %09return 1/((2*Math.sqrt(2)/9801) * summation(k -%3E piSum(k), 0, top));%0A  %7D%0A  %0A  public static double summation(Function%3CInteger, Double%3E function, int k, int top)%0A  %7B%0A  %09return top == k ? function.apply(k) : function.apply(top) + summation(function, k, top-1);%0A  %7D%0A  %0A  public static double piSum(int k)%0A  %7B%0A  %09return (factorial(4*k)*(1103 + 26390*k))/(Math.pow(factorial(k), 4)*Math.pow(396, 4*k));%0A  %7D%0A  %0A  public static int factorial(int n)%0A  %7B%0A  %09return n %3C 2 ? 1 : n*factorial(n-1);%0A  %7D%0A%7D%0A

Add PiMark.java to repo