code: public double getValue(double x)
  	{
  		synchronized(interpolatingRationalFunctionsLazyInitLock) {
  			if(interpolatingRationalFunctions == null) {
  				doCreateRationalFunctions();
  			}
  		}
  
  		// Get interpolating rational function for the given point x
  		int pointIndex = java.util.Arrays.binarySearch(points, x);
  		if(pointIndex >= 0) {
  			return values[pointIndex];
  		}
  
  		int intervallIndex = -pointIndex-2;
  
  		// Check for extrapolation
  		if(intervallIndex < 0) {
  			// Extrapolation
  			if(this.extrapolationMethod == ExtrapolationMethod.CONSTANT) {
  				return values[0];
  			} else if(this.extrapolationMethod == ExtrapolationMethod.LINEAR) {
  				return values[0]+(values[1]-values[0])/(points[1]-points[0])*(x-points[0]);
  			} else {
  				intervallIndex = 0;
  			}
  		}
  		else if(intervallIndex > points.length-2) {
  			// Extrapolation
  			if(this.extrapolationMethod == ExtrapolationMethod.CONSTANT) {
  				return values[points.length-1];
  			} else if(this.extrapolationMethod == ExtrapolationMethod.LINEAR) {
  				return values[points.length-1]+(values[points.length-2]-values[points.length-1])/(points[points.length-2]-points[points.length-1])*(x-points[points.length-1]);
  			} else {
  				intervallIndex = points.length-2;
  			}
  		}
  
  		RationalFunction rationalFunction = interpolatingRationalFunctions[intervallIndex];
  
  		// Calculate interpolating value
  		return rationalFunction.getValue(x-points[intervallIndex]);
  	}
docs: Get an interpolated value for a given argument x.
  
  @param x The abscissa at which the interpolation should be performed.
  @return The interpolated value (ordinate).