Getting residual "nan" from the start

Perhaps Default absolute tolerance and relative tolerance - #4 by nate can help.