Improved solution nearZero.m (p16)