code: public void setTolerance(double tolerance)
      {
          if (Double.isNaN(tolerance) || Double.isInfinite(tolerance) || tolerance <= 0)
              throw new IllegalArgumentException("Tolerance must be positive, not " + tolerance);
          this.tolerance = tolerance;
      }
docs: Sets the convergence tolerance target. Relative changes that are smaller
  than the given tolerance will determine convergence.
  <br><br>
  The default value used is that suggested in the original paper of 0.0005
  
  @param tolerance the positive convergence tolerance goal