docs: public static double deriv(double pred, double y, double c)
      {
          double x = pred-y;
  
          if (Math.abs(x) <= c)
              return x;
          else
              return c * Math.signum(x);
      }