public static double process_F64(double sample, double x[], double y[], int i0, int i1) {
		double result = 0;

		for (int i = i0; i <= i1; i++) {
			double numerator = 1.0;

			for (int j = i0; j <= i1; j++) {
				if (i != j)
					numerator *= sample - x[j];
			}

			double denominator = 1.0;

			double a = x[i];

			for (int j = i0; j <= i1; j++) {
				if (i != j)
					denominator *= a - x[j];
			}

			result += (numerator / denominator) * y[i];
		}

		return result;
	}
public static double process_F64 ( double sample , double x [ ] , double y [ ] , int i0 , int i1 ) { double result = 0 ; for ( int i = i0 ; i <= i1 ; i ++ ) { double numerator = 1.0 ; for ( int j = i0 ; j <= i1 ; j ++ ) { if ( i != j ) numerator *= sample - x [ j ] ; } double denominator = 1.0 ; double a = x [ i ] ; for ( int j = i0 ; j <= i1 ; j ++ ) { if ( i != j ) denominator *= a - x [ j ] ; } result += ( numerator / denominator ) * y [ i ] ; } return result ; }
UsingLlangrange's formula it interpulates the value of a function at the specified sample
point given discrete samples.  Which samples are used and the order of the approximation are
given by i0 and i1.

@param sample Where the estimate is done.
@param x	  Where the function was sampled.
@param y	  The function's value at the sample points
@param i0	 The first point considered.
@param i1	 The last point considered.
@return The estimated y value at the sample point.