I'm trying to calculate PI with some algorithms, but the main thing is to display it with precision of 30. I tried to output a string with format
etc. But it seems that maximum precision of double
is 15. Is there any class or some method to help me with this ?
I've already tried:
public class Challenge6PI {
public static void main(String[] args){
System.out.format( "%.30f",
Math.log(Math.pow(640320, 3) + 744) / Math.sqrt(163));
}
}