apply nearest integer continued fraction expansion algorithm to -1%2Fpi