Since computing the residual norm effectively requires p**2, the
correct limit to avoid an overflow is sqrt(DBL_MAX), or roughly
exp(300).
This change fixes crashes due to SIGFPE in cases where floating point
exceptions have been enabled, and also fixes a few cases where the
solver did not previously converge.