docs: public static double root(double eps, int maxIterations, double a, double b, Function1D f)
      {
          double x1 = a;
          double x2 = b;
          double fx1 = f.f(x1);
          double fx2 = f.f(x2);
          double halfEps = eps*0.5;
          
          if(fx1* fx2 >= 0)
              throw new ArithmeticException("The given interval does not appear to bracket the root");
          
          double dif = 1;//Measure the change interface values
          while( abs(x1-x2) > eps && maxIterations-->0)
          {
              double x3 = (x1+x2)*0.5;
              
              double fx3 = f.f(x3);
              
              double x4 = x3+(x3-x1)*signum(fx1-fx2)*fx3/sqrt(fx3*fx3-fx1*fx2); 
           
              double fx4 = f.f(x4);
              if(fx3 * fx4 < 0)
              {
                  x1 = x3;
                  fx1 = fx3;
                  x2 = x4;
                  fx2 = fx4;
              }
              else if(fx1 * fx4 < 0)
              {
                  dif = abs(x4 - x2);
                  if(dif <= halfEps)//WE are no longer updating, return the value
                      return x4;
                  x2 = x4;
                  fx2 = fx4;
              }
              else
              {
                  dif = abs(x4 - x1);
                  if(dif <= halfEps)//WE are no longer updating, return the value
                      return x4;
                  x1 = x4;
                  fx1 = fx4;
              }
              
          }
          
          
          return x2;
      }