Set fit parameters limits can get so different result?

i fit a 2dgraph ,i found : if i don’t set parmeters limits ,i can not get results.
but when i set parmeters limits ,and even a small change of the limits ,the results change greatly.
for example:

fit->SetParLimits(i,-11000,11000);
chang into :

fit->SetParLimits(i,-10000,10000);
all_diff_data.txt (3.81 KB)
fit2Dg_of_diff.c (4.14 KB)

Hi,
your fit seems to fail.
I suggest you to check your function and to set the parameter at the beginning to some reasanable value (not all zero as it is now).
Often it helps also to fix first some of the parameter and then release later.

Your script also contains some C++ errors, here attached is the corrected one,

Lorenzo
fit2Dg_of_diff.c (4.25 KB)