One-pass Algorithm for π