Add precise_output argument to test optimize.
#6111
Merged
precise_output argument to test optimize.
#6111