Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running error #192

Open
ceceNo1 opened this issue Apr 18, 2024 · 0 comments
Open

running error #192

ceceNo1 opened this issue Apr 18, 2024 · 0 comments

Comments

@ceceNo1
Copy link

ceceNo1 commented Apr 18, 2024

When I ran this program, it was stuck in a step and couldn't go forward.
optimiz.c:
1601 alam = alam2 = f2 = fold2 = tmplam = .0;
1675 a=(rhs1/(alamalam)-rhs2/(alam2alam2))/(alam-alam2);
1676 b=(-alam2rhs1/(alamalam)+alamrhs2/(alam2alam2))/(alam-alam2);
While debugging and analyzing the source code, I noticed that the initial value of double alam2 in optimiz.c:Lnsrch was 0, and alam2 was not assigned again in the subsequent calculations. Thus in the calculation of optimiz.c:1675-1676, alam2 appears as the denominator. This results in a division by 0 situation, where a and b are both Nan. I would like to ask the author if this is a tacit (design thought) situation or if it is triggered by my usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant