Skip to content

Conversation

langou
Copy link
Contributor

@langou langou commented Jun 15, 2025

This adds a NaN check on the entries of the input matrix A in GEEV,

GEEV would now return error INFO = -4 if there are NaNs in matrix A in input.

NaNs in input are detected with LANGE. Since LANGE is called for scaling anyway, there is no extra cost.

This follows @angsch's suggestion in issue #1128. This uses DISNAN instead of DISFINITE (as initially suggested). I am not opposed to create a DISFINITE function and use it, but I think it needs more decisions and consensus.

See as well PR#471 for a "similar" behavior.

@langou langou changed the title Try adding parts of @angsch's suggestion add NaN checks for input matrix A in GEEV, return error if NaN are in matrix A, NaNs in input are detected with LANGE (needed for scaling) Jun 15, 2025
Copy link

@TiborGY TiborGY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it would be worth noting in the documentation that these subroutines check for NaNs in A.
E.g. something like this:

*> \param[in,out] A
*> \verbatim
*>          A is DOUBLE PRECISION array, dimension (LDA,N)
*>          On entry, the N-by-N matrix A, which must not contain any NaN elements.
*>          On exit, A has been overwritten.
*>          Note: A is checked for NaNs on entry, and an error exit is performed if any are found.
*> \endverbatim

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.

3 participants