This is my Arduino Code.
The problem is C++ code find the correct function, but Arduino is not.
There is no such thing as "Arduino Code." Arduino is coded in C++.
int param, iteration, nloops, n, cycle, nfree;
int npts; /* Number of data pairs */
double x[maxnpts], y[maxnpts], sigmay[maxnpts]; /*x,y,y, uncertainty*/
double weight[maxnpts]; /*Weighting factor*/
double yfit[maxnpts]; /*calculated values of y*/
double a[nterms], sigmaa[nterms], b[nterms]; /*a=c params*/
double beta[nterms], c[nterms]; /*To be fit by program*/
double finala[nterms], lastsigmaa[nterms];
double alpha[nterms][nterms], arry[nterms][nterms];
72 Bytes // someone may need to check me on this one
double aug[nterms][nterms*2]; /*For matrix inversion */
double deriv[maxnpts][nterms]; /*Derivatives */
double flambda; /*Proportion of gradient search(=0.001 at start)*/
double chisq; /*Variance of residuals in curve fit*/
double chisq1, fchisq, sy;
Right out of the gate you are using 558 bytes of SRAM be mindful of that.
If you are compiling this code in the Arduino IDE you should have a void setup() function that does any one time operations (like Serial.begin()) and a void loop() which is much like a void main(). Neither of those appear in the code you posted. Additionally there are many places in your code where you refer to arrays like 'a' and 'x' but don't give any indexes. So the code you have posted doesn't even compile.