The intercept
a = (ΣY - b(ΣX)) / N

@param float $b

@return float
14509
private function aIntercept($b) {
        return (float) ($this->sum($this->yVector) / $this->count) - 
        ($b * ($this->sum($this->xVector) / $this->count));
    }
697251
public function Multiply($a, $b)
    {
        $this->preOpMethodParamsCheck(array($a, $b));

        return $this->math->mul($a, $b);
    }
1296742
public static function zeroFill($a, $b)
    {
        $z = hexdec(80000000);
        if ($z & $a) {
            $a = ($a>>1);
            $a &= (~$z & 0xffffffff);
            $a |= 0x40000000;
            $a = ($a >> ($b-1));
        } else {
            $a = ($a >> $b);
        }
        return $a;
    }
478098
public double sum(final float b)
  {
    if (b < min) {
      return 0;
    }
    if (b >= max) {
      return count;
    }

    int index = Arrays.binarySearch(positions, 0, binCount, b);
    boolean exactMatch = index >= 0;
    index = exactMatch ? index : -(index + 1);

    // we want positions[index] <= b < positions[index+1]
    if (!exactMatch) {
      index--;
    }

    final boolean outerLeft = index < 0;
    final boolean outerRight = index >= (binCount - 1);

    final long m0 = outerLeft ? 0 : (bins[index] & COUNT_BITS);
    final long m1 = outerRight ? 0 : (bins[index + 1] & COUNT_BITS);
    final double p0 = outerLeft ? min : positions[index];
    final double p1 = outerRight ? max : positions[index + 1];
    final boolean exact0 = (!outerLeft && (bins[index] & APPROX_FLAG_BIT) == 0);
    final boolean exact1 = (!outerRight && (bins[index + 1] & APPROX_FLAG_BIT) == 0);

    // handle case when p0 = p1, which happens if the first bin = min or the last bin = max
    final double l = (p1 == p0) ? 0 : (b - p0) / (p1 - p0);

    // don't include exact counts in the trapezoid calculation
    long tm0 = m0;
    long tm1 = m1;
    if (exact0) {
      tm0 = 0;
    }
    if (exact1) {
      tm1 = 0;
    }
    final double mb = tm0 + (tm1 - tm0) * l;
    double s = 0.5 * (tm0 + mb) * l;

    for (int i = 0; i < index; ++i) {
      s += (bins[i] & COUNT_BITS);
    }

    // add full bin count if left bin count is exact
    if (exact0) {
      return (s + m0);
    } else {
      // otherwise add only the left half of the bin
      return (s + 0.5 * m0);
    }
  }
953033
public function less($b)
    {
        switch (true) {
            case $b instanceof Matrix:
                $c = $this->lessMatrix($b);
                break;
            
            case $b instanceof ColumnVector:
                $c = $this->lessColumnVector($b);
                break;

            case $b instanceof Vector:
                $c = $this->lessVector($b);
                break;

            case is_int($b) or is_float($b):
                $c = $this->lessScalar($b);
                break;

            default:
                throw new InvalidArgumentException('Cannot compare matrix'
                    . ' to a ' . gettype($b) . '.');
        }

        return $c;
    }
906931
private function compare_float( $a, $b ) {
		$a = number_format( $a, 4 );
		$b = number_format( $b, 4 );
		if ( 0 === $a - $b ) {
			return 0;
		} elseif ( $a - $b < 0 ) {
			return -1;
		} else {
			return 1;
		}
	}
606848
private static function mult($a, $b)
    {
        $sum = self::$ltable[$a] + self::$ltable[$b];
        $sum %= 255;
        // Get the antilog
        $sum = self::$atable[$sum];

        return ($a == 0 ? 0 : ($b == 0 ? 0 : $sum));
    }
802737
public function dist(&$A, &$B)
    {
        $h1 = $this->simhash($A);
        $h2 = $this->simhash($B);
        $d = 0;
        for ($i=0;$i<$this->length;$i++) {
            if ($h1[$i]!=$h2[$i])
                $d++;
        }

        return $d;
    }
1218298
public function Subtract($a, $b)
    {
        $this->preOpMethodParamsCheck(array($a, $b));

        return $this->math->sub($a, $b);
    }
1158477
public function getY() : ?float 
    {
        if ( ! $this->hasY()) {
            $this->setY($this->getDefaultY());
        }
        return $this->y;
    }
1294275
private function zeroCompare($a, $b)
    {
        return ($this->math->comp($a, '0') <= 0 || $this->math->comp($b, '0') <= 0);
    }
1024289
public function call($a, $b)
    {
        return $a * ($b / $this->gcdMath->call($a, $b));
    }
782005
public static function INTERCEPT($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->getIntersect();
    }
797239
public static function continuedFraction($a, $b, $x)
    {
        $maxit = 100;
        $eps = 3e-16;
        $fpmin = 1e-30;
        
        $qab = $a + $b;
        $qap = $a + 1;
        $qam = $a - 1;

        $c = 1.0;
        $d = 1.0 - $qab*$x/$qap;

        if (abs($d)<$fpmin) {
            $d = $fpmin;
        }

        $d = 1.0/$d;

        $h = $d;

        for ($m = 1; $m < $maxit; $m++) {
            $m2 = 2*$m;
            $aa = $m*($b-$m)*$x/(($qam + $m2)*($a + $m2));
            $d = 1.0 + $aa*$d;

            if (abs($d)<$fpmin) {
                $d = $fpmin;
            }

            $c = 1.0 + $aa/$c;

            if (abs($c)<$fpmin) {
                $c = $fpmin;
            }

            $d = 1.0/$d;
            $h = $h*$d*$c;
            $aa = -($a + $m)*($qab + $m)*$x/(($a+$m2)*($qap+$m2));
            $d = 1.0 + $aa*$d;

            if (abs($d)<$fpmin) {
                $d = $fpmin;
            }

            $c = 1.0 + $aa/$c;

            if (abs($c)<$fpmin) {
                $c = $fpmin;
            }

            $d = 1.0/$d;
            $del = $d*$c;
            $h = $h*$del;

            if (abs($del-1.0)< $eps) {
                break;
            }
        }
        return $h;
    }
1269112
public static function gcd($a, $b)
    {
        $ta = abs($a);
        $tb = abs($b);
        while ($tb != 0) {
            $tmp = $tb;
            $tb = $ta % $tb;
            $ta = $tmp;
        }
        
        return $ta;
    }
569719
public function longitude(): float
    {
        if (preg_match('/\n4 LONG (.+)/', $this->gedcom, $match)) {
            $gedcom_service = new GedcomService();

            return $gedcom_service->readLongitude($match[1]);
        }

        return 0.0;
    }
439522
public function absMin() : float
    {
        $result = 0.0;

        foreach ($this->components as $component) {
            if ($result > $abs = abs($component)) {
                $result = $abs;
            }
        }

        return $result;
    }