docs: public double evaluate(double x, double epsilon, int maxIterations) {
          final double small = 1e-50;
          double hPrev = getA(0, x);
  
          // use the value of small as epsilon criteria for zero checks
          if (Precision.isEquals(hPrev, 0.0, small)) {
              hPrev = small;
          }
  
          int n = 1;
          double dPrev = 0.0;
          double cPrev = hPrev;
          double hN = hPrev;
  
          while (n < maxIterations) {
              final double a = getA(n, x);
              final double b = getB(n, x);
  
              double dN = a + b * dPrev;
              if (Precision.isEquals(dN, 0.0, small)) {
                  dN = small;
              }
              double cN = a + b / cPrev;
              if (Precision.isEquals(cN, 0.0, small)) {
                  cN = small;
              }
  
              dN = 1 / dN;
              final double deltaN = cN * dN;
              hN = hPrev * deltaN;
  
              if (Double.isInfinite(hN)) {
                  throw new IllegalStateException(
                          "Continued fraction convergents diverged to +/- infinity for value " + x);
              }
              if (Double.isNaN(hN)) {
                  throw new IllegalStateException(
                          "Continued fraction diverged to NaN for value " + x);
              }
  
              if (Math.abs(deltaN - 1.0) < epsilon) {
                  break;
              }
  
              dPrev = dN;
              cPrev = cN;
              hPrev = hN;
              n++;
          }
  
          if (n >= maxIterations) {
              throw new IllegalStateException(
                      "Continued fraction convergents failed to converge (in less than " +
                              maxIterations + " iterations) for value " + x);
          }
  
          return hN;
      }