Experiments in calculating pi in javascript