BUG: numerical precision in resid_pearson with perfect fit #1229

supersedes #1227

see #1229 numerical precision of resid with perfect fit