code: private static double cubicInterpolate(final double x0, final double y0, final double x1,
        final double y1, final double x2, final double y2, final double x3, final double y3,
        final double x) {
      final double l0Numer = (x - x1) * (x - x2) * (x - x3);
      final double l1Numer = (x - x0) * (x - x2) * (x - x3);
      final double l2Numer = (x - x0) * (x - x1) * (x - x3);
      final double l3Numer = (x - x0) * (x - x1) * (x - x2);
  
      final double l0Denom = (x0 - x1) * (x0 - x2) * (x0 - x3);
      final double l1Denom = (x1 - x0) * (x1 - x2) * (x1 - x3);
      final double l2Denom = (x2 - x0) * (x2 - x1) * (x2 - x3);
      final double l3Denom = (x3 - x0) * (x3 - x1) * (x3 - x2);
  
      final double term0 = (y0 * l0Numer) / l0Denom;
      final double term1 = (y1 * l1Numer) / l1Denom;
      final double term2 = (y2 * l2Numer) / l2Denom;
      final double term3 = (y3 * l3Numer) / l3Denom;
  
      return term0 + term1 + term2 + term3;
    }
docs: In C: again-two-registers cubic_interpolate_aux_aux L1346