Add option to output exact solution