Catch division by zero in partially deteriorated calculations.
Also renamed minsdr to maxsdr for accuracy.