Skip to content

Incorrect behaviour in real ?LACN2 under Fortran 95 SIGN semantics. Improved some ?COPY testing. #402

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

Merged
merged 4 commits into from
Mar 30, 2020

Conversation

matcross
Copy link
Contributor

@matcross matcross commented Mar 30, 2020

Hi,

My colleague Edvin Hopkins at NAG noticed that SLACN2 and DLACN2 suffers from the change in meaning of SIGN at Fortran 95, with respect to negative zero. With DLACN2 this was manifesting as incorrect results in the DGEEVX example program we distribute with our numerical library.

The intended semantics can be seen in the original paper e.g. at http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.117.4839&rep=rep1&type=pdf (page 384), so we suggest inlining the expression as an IF block in order to uniformly force the correct behaviour.

I have also taken the opportunity to improve the new INCX==INCY=0 testing in ?blat1 in order to run the new tests only once and to display the correct INC values on failure.

@matcross matcross changed the title Incorrect behaviour in DLACN2 under Fortran 95 SIGN semantics. Improved some ?COPY testing. Incorrect behaviour in real ?LACN2 under Fortran 95 SIGN semantics. Improved some ?COPY testing. Mar 30, 2020
@Reference-LAPACK Reference-LAPACK deleted a comment from codecov bot Mar 30, 2020
@langou langou merged commit d7391de into Reference-LAPACK:master Mar 30, 2020
@langou
Copy link
Contributor

langou commented Mar 30, 2020

Thanks Mat!

christoph-conrads pushed a commit to christoph-conrads/lapack that referenced this pull request May 23, 2021
Incorrect behaviour in real ?LACN2 under Fortran 95 SIGN semantics. Improved some ?COPY testing.
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