apply nearest integer continued fraction expansion algorithm to -1/pi