Just randomly came up with this after reading about how pi was first discovered and calculated. Im thinking of writing code that calculates pi to many decimals but figuring this out was hard enough lol.
<?php
Function mypi (){
return (16*(atan(1/5)) - (4*atan(1/239)));
}
?>
Can be proved true when tested against php’s own Pi fucntion.