Fix xORBDB6 performs numerically unadvisable operations#647
Conversation
|
The fixes are only implemented for SORBDB6 so far. |
8ea160d to
9a68612
Compare
|
@langou The changes from SORBDB6 were applied to DORBDB6, CUNBDB6, ZUNBDB6. The pull request should be complete. |
|
@langou There are 28 compiler errors and at least one test executable is not present. Is this fixed on |
The zeros are overwritten by the following SORGQR call.
This patch was authored by Brian D. Sutton and posted to the discussion of LAPACK pull request Reference-LAPACK#406. * fix indexing for vector increments different from one * always set vectors that are numerically zero to zero Previously SORBDB6 would only set vectors to zero if a second iteration of Gram-Schmidt was necessary. This would cause problems on the caller site if the test for a zero vector differed from the SORBDB6 test for zero.
* Require unit-norm vector X for otherwise the following computations might underflow * Avoid over- and underflows in the computation of the Euclidean norm of X * Fix the Euclidean norm computation after the second Gram-Schmidt iteration * Consider round-off errors when checking for zero vectors * Update identifiers
This change makes it easier to port the recent changes to SORBDB6 to (complex) double precision.
* Require unit-norm vector X for otherwise the following computations might underflow * Avoid over- and underflows in the computation of the Euclidean norm of X * Fix the Euclidean norm computation after the second Gram-Schmidt iteration * Consider round-off errors when checking for zero vectors * Update identifiers Note that the caller DORBDB5 always passed unit-norm vectors X.
* Require unit-norm vector X for otherwise the following computations might underflow * Avoid over- and underflows in the computation of the Euclidean norm of X * Fix the Euclidean norm computation after the second Gram-Schmidt iteration * Consider round-off errors when checking for zero vectors * Update identifiers Note that the caller CUNBDB5 always passed unit-norm vectors X.
* Require unit-norm vector X for otherwise the following computations might underflow * Avoid over- and underflows in the computation of the Euclidean norm of X * Fix the Euclidean norm computation after the second Gram-Schmidt iteration * Consider round-off errors when checking for zero vectors * Update identifiers Note that the caller ZUNBDB5 always passed unit-norm vectors X. Thank you @angsch for discovering typos in the function names (`CLASSQ` was called instead of `ZLASSQ`).
9a68612 to
54b3964
Compare
|
The code changes in all four variants are horribly broken: the variable |
There is no warning with GCC 11 about an undeclared and uninitialized varible being read without the `-Wextra` flag. Why?
Codecov Report
@@ Coverage Diff @@
## master #647 +/- ##
=======================================
Coverage 0.00% 0.00%
=======================================
Files 1894 1894
Lines 184140 184118 -22
=======================================
+ Misses 184140 184118 -22
Continue to review full report at Codecov.
|
| *> criterion, then the zero vector is returned. | ||
| *> The projection is computed with at most two iterations of the | ||
| *> classical Gram-Schmidt algorithm, see | ||
| *> * L. Giraud, J. Langou, M. Rozložník. "On the round-off error |
There was a problem hiding this comment.
Thanks for quoting this paper.
I think the following paper is a better quote for this fact:
L. Giraud, J. Langou, M. Rozložník, Jasper van den Eshof. "Rounding error analysis of the classical Gram-Schmidt orthogonalization process." Numerische Mathematik, volume volume 101, pages 87–100, 2005. DOI = 10.1007/s00211-005-0615-4.
Description
fixes #634
Checklist