GNU Scientific Library - Bugs: bug #42219, Division by zero in...
You are not allowed to post comments on this tracker with your current authentication level.
bug #42219: Division by zero in "gnewton" when "f" and "fdf" differ
Submitter: | Patrick Alken <psa> | ||
Submitted: | Mon 28 Apr 2014 03:42:25 PM UTC | ||
Category: | Runtime error | Severity: | 3 - Normal |
Operating System: | Status: | None | |
Assigned to: | None | Open/Closed: | Open |
Release: |
Mon 28 Apr 2014 04:10:42 PM UTC, comment #1: |
Patrick Alken <psa> |
Mon 28 Apr 2014 03:42:25 PM UTC, original submission:
Hello GSL team,
|
Patrick Alken <psa> |
Depends on the following items: None found
Items that depend on this one: None found
Follows 1 latest change.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2014-04-28 | psa | Attached File | - | Added bug_gnewton.c, #31265 |
Powered by Savane 3.13-758e.
Corresponding source code
The problem seems to be in this line of gnewton_set() in multiroots/gnewton.c:
122 state->phi = enorm(f);
In the example program, the initial guess x is the solution vector, so the F_DF call provides a vector f = 0.
Then in the first gnewton_iterate() call, on line
177 double theta = phi1 / phi0;
we divide by 0.