/** * Get coefficients. * * Calculate and return coefficients based on current data. * @param int $numberOfCoefficient Ignored. * @return array Array of coefficients (as BC strings). */ public function getCoefficients($numberOfCoefficient = -1) { $result = parent::getCoefficients(2); $result[0] = exp($result[0]); return $result; }
/** * Add data. * * Add a data point to calculation. * @param float $x Some real value. * @param float $y Some real value corresponding to $x. */ public function addData($x, $y) { // Take the natural log of x before adding this data. $x = log($x); parent::addData($x, $y); }