tsmeyer
05-10-2007, 11:31 AM
I have recently purchased NR C ver 2.10 as well as the source CD (because I don't like to type code from a book). I attempted to implement the fit() function, from 15.2, in an embedded app and it failed. I then took the example application xfit() from the CD and compiled it on my PC using Dev-C++. The errors are identical and the failure is the same.
1. first it failed in the gammq() function call returning
"Numerical Recipes run-time error...
a too large, ITMAX too small in gcf"
I commented out the call to gammq() at the end of fit to see if it was working at all.
2. After commenting out this is the results:
Ignoring standard deviations
a = -1.#IND00 uncertainty: -1.#IND00
b = -1.#IND00 uncertainty: -1.#IND00
chi-squared: -1.#IND00
goodness-of-fit: 1.000000
Including standard deviations
a = -1.#IND00 uncertainty: 0.100755
b = -1.#IND00 uncertainty: 0.017321
chi-squared: -1.#IND00
goodness-of-fit: 1.000000
Again, this is the code straight off the CD and compiled on an ANSI C/C++ compiler!!
Any Ideas.
Thanks
tsmeyer
1. first it failed in the gammq() function call returning
"Numerical Recipes run-time error...
a too large, ITMAX too small in gcf"
I commented out the call to gammq() at the end of fit to see if it was working at all.
2. After commenting out this is the results:
Ignoring standard deviations
a = -1.#IND00 uncertainty: -1.#IND00
b = -1.#IND00 uncertainty: -1.#IND00
chi-squared: -1.#IND00
goodness-of-fit: 1.000000
Including standard deviations
a = -1.#IND00 uncertainty: 0.100755
b = -1.#IND00 uncertainty: 0.017321
chi-squared: -1.#IND00
goodness-of-fit: 1.000000
Again, this is the code straight off the CD and compiled on an ANSI C/C++ compiler!!
Any Ideas.
Thanks
tsmeyer