You can modify the GSL iterate functions to shorten the step size by factors of two in the case until a legitimate step is found.
See for example lines 833-871 of http://o2scl.svn.sourceforge.net/viewvc/o2scl/trunk/src/root/gsl_mroot_hybrids.h?revision=46&view=markup where I've made a similar modification in the C++ context. Take care, Andrew On Mon, Nov 2, 2009 at 6:22 PM, Huaiyu Duan <[email protected]> wrote: > If the step size of the (multi)root finder is too big, it can enter > the region where the function is undefined (e.g., sqrt(-1)). I tried > having the function return the out of range error (GSL_EDOM), and the > iteration failed with the bad function error (GSL_EBADFUNC). I then > tried changing the solver's step size by manipulating solver->dx which > actually did not affect the step size. Is there a way to change the > step size used by the root finder? Thanks! > > > _______________________________________________ > Help-gsl mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/help-gsl > _______________________________________________ Help-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gsl
