Scala: Relative check for epsilon check in Newton's method.