[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] [bug #42220] Division by zero in "hybrid*" when initial guess
From: |
Oliver Ofenloch |
Subject: |
[Bug-gsl] [bug #42220] Division by zero in "hybrid*" when initial guess is root |
Date: |
Thu, 12 Jun 2014 13:07:05 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0 |
Follow-up Comment #1, bug #42220 (project gsl):
Hi!
In fact lambda = p.v becomes zero if the last x vector matches the root of the
system too closely.
The problem can be solved by returning GSL_EZERODIV in function
broyden_iterate (file broden.c, line 368, gsl-1.15) instead of calling
GSL_ERROR ("approximation to Jacobian has collapsed", GSL_EZERODIV).
The iteration loop then hast to check if the last x vector is a root of the
system:
do {
++iter;
status = gsl_multiroot_fsolver_iterate(solver);
if (status != GSL_SUCCESS) {
status = gsl_multiroot_test_residual(gsl_multiroot_fsolver_f(solver),
EPSABS);
break;
}
status = gsl_multiroot_test_residual(gsl_multiroot_fsolver_f(solver),
EPSABS);
} while ((status == GSL_CONTINUE) && (iter < 1000));
Sorry for the bad formatting, but I'm new here. If you have any questinos,
please feel free to contact me.
Best regards
Oliver
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?42220>
_______________________________________________
Nachricht gesendet von/durch Savannah
http://savannah.gnu.org/
- [Bug-gsl] [bug #42220] Division by zero in "hybrid*" when initial guess is root,
Oliver Ofenloch <=