A simple interpolation between existing numbers.

@param xValue the value for which we want the y
@return the y value
426461
public Double linearInterpolateY( Double xValue ) {

        Double first = xList.get(0);
        Double last = xList.get(xList.size() - 1);

        // check out of range
        if (first <= last) {
            if (xValue < xList.get(0) || xValue > xList.get(xList.size() - 1)) {
                return new Double(Double.NaN);
            }
            isInverse = false;
        } else {
            // inverse proportional
            if (xValue > xList.get(0) || xValue < xList.get(xList.size() - 1)) {
                return new Double(Double.NaN);
            }
            isInverse = true;
        }

        for( int i = 0; i < xList.size(); i++ ) {
            Double x2 = xList.get(i);
            // if equal to a number in the list
            if (x2.equals(xValue)) {
                return yList.get(i);
            }// else interpolate
            else if ((!isInverse && x2 > xValue) || (isInverse && x2 < xValue)) {
                double x1 = xList.get(i - 1);
                double y1 = yList.get(i - 1);
                double y2 = yList.get(i);

                double y = (y2 - y1) * (xValue - x1) / (x2 - x1) + y1;
                return y;
            }
        }
        return new Double(Double.NaN);
    }
1118276
@Pure
	public static Point2d L3_L4(double x, double y) {
		final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y,
				LAMBERT_3_N,
				LAMBERT_3_C,
				LAMBERT_3_XS,
				LAMBERT_3_YS);
		return NTFLambdaPhi_NTFLambert(
				ntfLambdaPhi.getX(), ntfLambdaPhi.getY(),
				LAMBERT_4_N,
				LAMBERT_4_C,
				LAMBERT_4_XS,
				LAMBERT_4_YS);
	}
772020
public static double mul(float v1, float v2) {
		return mul(Float.toString(v1), Float.toString(v2)).doubleValue();
	}
525257
private static double interpolateUsingXArrAndYStride(final double[] xArr, final double yStride,
      final int offset, final double x) {
    return cubicInterpolate(
        xArr[offset + 0], yStride * (offset + 0),
        xArr[offset + 1], yStride * (offset + 1),
        xArr[offset + 2], yStride * (offset + 2),
        xArr[offset + 3], yStride * (offset + 3),
        x);
  }
943963
public Object getValue(int x) {
    if (x >= width())
      throw new IllegalArgumentException("Index out of scope on axis (" + x + " >= " + width() + ")!");

    return m_Min + m_Step*x;
  }
404098
private function __convertValue($sValue)
    {
        $cType = substr($sValue, 0, 1);
        $sValue = substr($sValue, 1);
        switch ($cType)
        {
            case 'S':
                $value = ($sValue === false ? '' : $sValue);
                break;
            case 'B':
                $value = $this->__convertStringToBool($sValue);
                break;
            case 'N':
                $value = ($sValue == floor($sValue) ? (int)$sValue : (float)$sValue);
                break;
            case '*':
            default:
                $value = null;
                break;
        }
        return $value;
    }
340116
public NumberExpression<Double> y() {
        if (y == null) {
            y = Expressions.numberOperation(Double.class, SpatialOps.Y, mixin);
        }
        return y;
    }
369439
private static double interpolateUsingXAndYTables(final double[] xArr, final double[] yArr,
      final int offset, final double x) {
    return cubicInterpolate(xArr[offset], yArr[offset], xArr[offset + 1], yArr[offset + 1],
        xArr[offset + 2], yArr[offset + 2], xArr[offset + 3], yArr[offset + 3], x);
  }
533047
public static double randomNum(int x, int y) {
        int max = x + 1;
        int min = y + 1;
        Random random = new Random();
        int result = random.nextInt(max)%(max-min+1) + min;
        return result - 1;
    }
1227696
public static Double evaluate(double x, double y) {
        return (
            0.75 * Math.exp(-Math.pow((9 * x - 2), 2.0) / 4.0 - Math.pow((9 * y - 2), 2.0) / 4.0) +
            0.75 * Math.exp(-Math.pow((9 * x + 1), 2.0) / 49.0 - (9 * y + 1) / 10.0) +
            0.5 * Math.exp(-Math.pow((9 * x - 7), 2.0) / 4.0 - Math.pow((9 * y - 3), 2.0) / 4.0) -
            0.2 * Math.exp(-Math.pow((9 * x - 4), 2.0) - Math.pow((9 * y - 7), 2.0))
        );
    }
1139026
function (v) {
            var _vz = v.z || 0;
            return this._set((this.x < v.x) ? this.x : v.x, (this.y < v.y) ? this.y : v.y, (this.z < _vz) ? this.z : _vz);
        }
835062
public String get(int x, int y)
    {
        if (x < 0) return HEAD + x;
        if (x >= v.length) return HEAD + "+" + (x - v.length + 1);

        return v[x][y];
    }
1131055
public int get24( int x , int y ) {
		int i = startIndex + y*stride+x*3;
		return ((data[i]&0xFF) << 16) | ((data[i+1]&0xFF) << 8) | (data[i+2]&0xFF);
	}
1222918
public function get($x, $y)
    {
        foreach ($this->units as $v) {
            if (!is_null($v->position) && $v->position->is_at($x, $y)) {
                return $v;
            }
        }
    }
1051285
@Pure
	public IntegerProperty y2Property() {
		if (this.p2.y == null) {
			this.p2.y = new SimpleIntegerProperty(this, MathFXAttributeNames.Y2);
		}
		return this.p2.y;
	}
575368
public static function RSQ($yValues, $xValues)
    {
        if (!self::checkTrendArrays($yValues, $xValues)) {
            return PHPExcel_Calculation_Functions::VALUE();
        }
        $yValueCount = count($yValues);
        $xValueCount = count($xValues);

        if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
            return PHPExcel_Calculation_Functions::NA();
        } elseif ($yValueCount == 1) {
            return PHPExcel_Calculation_Functions::DIV0();
        }

        $bestFitLinear = trendClass::calculate(trendClass::TREND_LINEAR, $yValues, $xValues);
        return $bestFitLinear->getGoodnessOfFit();
    }
633205
public function getValueOfYForX($xValue) {
		return $this->getIntersect() + $this->getSlope() * log($xValue - $this->_Xoffset);
	}