Test your PC speed# Java - 爪哇娇娃
P*M
1 楼
Using:
time java Pi xxx (the number of digits your want)
//////////////////////////////////////////////////
import java.math.*;
public class Pi{
private static final BigDecimal ZERO =
BigDecimal.valueOf(0);
private static final BigDecimal ONE =
BigDecimal.valueOf(1);
private static final BigDecimal FOUR =
BigDecimal.valueOf(4);
private static final int roundingMode =
BigDecimal.ROUND_HALF_EVEN;
public Pi() {
}
public static void main(String args[]){
int digits=100;
i
time java Pi xxx (the number of digits your want)
//////////////////////////////////////////////////
import java.math.*;
public class Pi{
private static final BigDecimal ZERO =
BigDecimal.valueOf(0);
private static final BigDecimal ONE =
BigDecimal.valueOf(1);
private static final BigDecimal FOUR =
BigDecimal.valueOf(4);
private static final int roundingMode =
BigDecimal.ROUND_HALF_EVEN;
public Pi() {
}
public static void main(String args[]){
int digits=100;
i