Error exp param[0]=718 up=719

Dear rooters compiling this macro give me that error. Please help me!
vitamu.txt (7.19 KB)
mu.c (1010 Bytes)

You must protect your function against very large or small values in the exp functions


what is the way to do it?

with if statements like in the example below


Double_t life(Double_t *x, Double_t *par) { Float_t xx = x[0]; //printf("xx=%g, p0=%g, p1=%g, p2=%g\n",xx,par[0],par[1],par[2]); Double_t xx1 = -xx/par[1]; Double_t xx2 = -xx/par[2]; if (xx1 > 300 || xx2 > 300) return 1e10; Double_t f = par[0]*(exp(xx1)+exp(xx2)); return f; }

thanks to help me, I’ve made the changes but it doesn’t work. It give to me abnormal termination of minimization.


In general you end up in this type of problem when
-the model is wrong
-the initial values of parameters are bad