macro to compare minimizaed thresholds
fast minimization with adaptive step