Calc equations of polynomial curve fitting are wrong

I use LibreOffice in Europe and my Calc uses the European standard of a comma for the decimal place in numbers. I have been trying to derive some polynomial equations to fit some data. The curves shown on the plots look OK, but the equations are very wrong. Is this because of the European decimal point? If so how do I get round it? If not, what is the problem?

James Chalmers

Please, attach the file to your question!
Use the upload icon on top of the editor window.

Very unlikely, if you think of a bug in Libre. Don’t you think somebody would have noticed in all that years?
.
You may have a problem how you imported your data.
To check this you could upload an example.
To test numbers yourself you could try decadic logarithm and compare to a result of a calculator.
=LOG(A1, 10)
https://wiki.documentfoundation.org/Documentation/Calc_Functions/LOG

I suppose that

simply isn’t a correct report about the facts.

The polynomial fitting follows the principle of minimizing the sum of the squares of the local differences.
Some years ago I tested with a few examples the results against what non-linear solvers found.
No significant differences.
Despite the fact that you still didn’t provide an example file, I made a new example.
The function to approximate isn’t arbitrary but an actual Poly-4 superposed with noise.
disask_135961_polynomialFitting_chart_solver.ods (59.5 KB)

I just added a checking of the coefficients by the function LINEST:

disask_135961_polynomialFitting_chart_solver_LINEST_check_added.ods (61.3 KB)

1 Like

Good idea!
We can back this way the assumption that LINEST() and the trendline generator of the chart use exactly the same algorithm.
The optimization condition (“least squares sum)” is implemented in this case using algebraic means.
To try it also with a non-linear solver adds an independent “second view”.
If there actually should be an issue caused by different settings (locale), I would not expect it to show the same way with the algebraic means and the solver.
Anyway, the questioner seems to be no longer interested.
Their first post may also have been the last one.

I hope there are no cannibals on the forum. :slight_smile: