docs: public static double loss(double pred, double y, double c)
      {
          final double x = y - pred;
          if (Math.abs(x) <= c)
              return x * x * 0.5;
          else
              return c * (Math.abs(x) - c / 2);
      }