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

GECON returns 1 if RCOND is NaN #926

Merged

Conversation

weslleyspereira
Copy link
Collaborator

@weslleyspereira weslleyspereira commented Nov 2, 2023

This is aligned to the behavior in the routines that compute norms, i.e., to propagate NaNs instead of calling XERBLA.

This PR also solves the issue about INFO returning zero when RCOND=NAN. This PR makes GECON return 1 if RCOND=NAN. The return INFO=1 is aligned to what we propose in the exception handling for LAPACK at https://arxiv.org/pdf/2207.09281.pdf

Complete behavior for INFO:

*> \param[out] INFO
*> \verbatim
*>          INFO is INTEGER
*>          = 0:  successful exit
*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
*>                NaNs are illegal values for ANORM, and they propagate to
*>                the output parameter RCOND.
*>                Infinity is illegal for ANORM, and it propagates to the output
*>                parameter RCOND as 0.
*>          = 1:  if RCOND = NaN, or
*>                   RCOND = Inf, or
*>                   the computed norm of the inverse of A is 0.
*>                In the latter, RCOND = 0 is returned.
*> \endverbatim

Related to #763.

Copy link

codecov bot commented Nov 2, 2023

Codecov Report

Attention: 80 lines in your changes are missing coverage. Please review.

Comparison is base (3a6f462) 0.00% compared to head (b2e7369) 0.00%.
Report is 4 commits behind head on master.

❗ Current head b2e7369 differs from pull request most recent head 68eafc6. Consider uploading reports for the commit 68eafc6 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #926   +/-   ##
=======================================
  Coverage    0.00%    0.00%           
=======================================
  Files        1918     1918           
  Lines      188645   188701   +56     
=======================================
- Misses     188645   188701   +56     
Files Coverage Δ
SRC/cunbdb6.f 0.00% <ø> (ø)
SRC/dorbdb6.f 0.00% <ø> (ø)
SRC/sorbdb6.f 0.00% <ø> (ø)
SRC/zunbdb6.f 0.00% <ø> (ø)
SRC/cbdsqr.f 0.00% <0.00%> (ø)
SRC/zbdsqr.f 0.00% <0.00%> (ø)
SRC/cgecon.f 0.00% <0.00%> (ø)
SRC/dgecon.f 0.00% <0.00%> (ø)
SRC/sgecon.f 0.00% <0.00%> (ø)
SRC/zgecon.f 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

langou
langou previously approved these changes Nov 2, 2023
@weslleyspereira weslleyspereira force-pushed the fix-nan-propag-gecon branch 3 times, most recently from 90b06e0 to 45f54c2 Compare November 9, 2023 00:36
@weslleyspereira weslleyspereira merged commit 2382be4 into Reference-LAPACK:master Nov 11, 2023
11 checks passed
vladimir-ch added a commit to gonum/gonum that referenced this pull request Nov 13, 2023
vladimir-ch added a commit to gonum/gonum that referenced this pull request Nov 13, 2023
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

Successfully merging this pull request may close these issues.

2 participants