problem in newt to pass from fortran to C++


melissa
12-13-2005, 10:47 AM
hi,
in my program i use the newt() routine with ludcmp(), lnsrch(), lubksb(), fmin() and fdjac() routines; initially my programme are written in FORTRAN language and then i translate my programme in C++. i use newt to resolve a 2-equations non-linear system with solution from 0 to 1, frequently near 0. while fortran version of newt works almost at all times, the C++ version have problems in several critical situations.
In particular in the ludcmp routine appears the "segmentation fault" errors or a routine (i think lnsrch but i'm not sure) has an infinite loop. these problems don't appear with the FORTRAN version. I noted that these problems happenless frequently when i reduce a tollerance in lnsrch (TOLX) but don't disappear.
Someone has a suggestion?

ps
sorry for the bad english

melissa
12-22-2005, 02:41 AM
finally,
i succeed in doing to work my routine. it was an error in function that calculate the system; i have forgotten a line when i have translated my routine.
sorry for my mistake.