mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 14:40:24 +02:00
TAChart: Fix divide-by-zero error in TFitSeries.
git-svn-id: trunk@62073 -
This commit is contained in:
parent
9107baee24
commit
6d317e22dc
@ -332,7 +332,10 @@ begin
|
||||
ycalc := CalcBestFitValues(x, y, n, m, FitParams);
|
||||
CalcSumOfSquares(y, dy, ycalc, Result.SSE, Result.SSR);
|
||||
SetLength(ycalc, 0);
|
||||
chi2 := Result.SSE / (n - mfit);
|
||||
if n > mfit then
|
||||
chi2 := Result.SSE / (n - mfit)
|
||||
else
|
||||
chi2 := NaN;
|
||||
|
||||
// Calculate inverse of alpha. This is (almost) the variance-covariance matrix
|
||||
invgen(mfit, mfit, alpha[0], term);
|
||||
|
Loading…
Reference in New Issue
Block a user