figured it out.
I am computing r^2 for a set of data. Here is a snippet of code:I keep getting . However when I change it to I get . So for some reason . Why? How do I change this? I declared all the important variables as float. I also did and it did not work.Code:for (i=1;i<=ndata;i++) { *chi2 += SQR(y[i]-(*a)-(*b)*x[i]); syy += 1/(ndata-1)*(*chi2); sdy += 1/(ndata-1)*SQR((y[i]-yavg)); *r2 = 1-(syy/sdy); sigdat=sqrt((*chi2)/(ndata-2)); *siga *= sigdat; *sigb *= sigdat; } } }