Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical.php
public static function GROWTH($yValues, $xValues = [], $newValues = [], $const = true)
    {
        $yValues = Functions::flattenArray($yValues);
        $xValues = Functions::flattenArray($xValues);
        $newValues = Functions::flattenArray($newValues);
        $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);

        $bestFitExponential = Trend::calculate(Trend::TREND_EXPONENTIAL, $yValues, $xValues, $const);
        if (empty($newValues)) {
            $newValues = $bestFitExponential->getXValues();
        }

        $returnArray = [];
        foreach ($newValues as $xValue) {
            $returnArray[0][] = $bestFitExponential->getValueOfYForX($xValue);
        }

        return $returnArray;
    }
public static function GROWTH($yValues, $xValues = [], $newValues = [], $const = true)
    {
        $yValues = Functions::flattenArray($yValues);
        $xValues = Functions::flattenArray($xValues);
        $newValues = Functions::flattenArray($newValues);
        $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);

        $bestFitExponential = Trend::calculate(Trend::TREND_EXPONENTIAL, $yValues, $xValues, $const);
        if (empty($newValues)) {
            $newValues = $bestFitExponential->getXValues();
        }

        $returnArray = [];
        foreach ($newValues as $xValue) {
            $returnArray[0][] = $bestFitExponential->getValueOfYForX($xValue);
        }

        return $returnArray;
    }
public static function GROWTH ( $ yValues , $ xValues = [ ] , $ newValues = [ ] , $ const = true ) { $ yValues = Functions :: flattenArray ( $ yValues ) ; $ xValues = Functions :: flattenArray ( $ xValues ) ; $ newValues = Functions :: flattenArray ( $ newValues ) ; $ const = ( $ const === null ) ? true : ( bool ) Functions :: flattenSingleValue ( $ const ) ; $ bestFitExponential = Trend :: calculate ( Trend :: TREND_EXPONENTIAL , $ yValues , $ xValues , $ const ) ; if ( empty ( $ newValues ) ) { $ newValues = $ bestFitExponential -> getXValues ( ) ; } $ returnArray = [ ] ; foreach ( $ newValues as $ xValue ) { $ returnArray [ 0 ] [ ] = $ bestFitExponential -> getValueOfYForX ( $ xValue ) ; } return $ returnArray ; }
GROWTH.

Returns values along a predicted emponential Trend

@param mixed[] $yValues Data Series Y
@param mixed[] $xValues Data Series X
@param mixed[] $newValues Values of X for which we want to find Y
@param bool $const a logical value specifying whether to force the intersect to equal 0

@return array of float
GROWTH .