Rewrite with arbitrary precision arithmetic