TypePHP 编译器 https://swoole.com/aot/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

15 lines
175 B

"use strict";
const rounds = 100000000;
let x = 1.0;
let pi = 1.0;
for (let i = 2; i < rounds + 2; i++) {
x *= -1;
pi += x / (2 * i - 1);
}
pi *= 4;
console.log(pi);