slightly speed up pi computation