Using arbitrary precision for optimization