Fix integer overflow in LAPACK DBDSQR, SBDSQR (#1135)
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Fri, 24 Mar 2017 21:05:22 +0000 (22:05 +0100)
committerGitHub <noreply@github.com>
Fri, 24 Mar 2017 21:05:22 +0000 (22:05 +0100)
commit7908efafc8c2c8f58bb52eabde879d117519ead3
tree154859298607db6fbe5def1a91afc9d889d6f015
parent66dc10b01912dae9c56a30ddc4bbc249d4fa6d56
Fix integer overflow in LAPACK DBDSQR, SBDSQR (#1135)

* Fix integer overflow in DBDSQR

As noted in lapack issue 135, an integer overflow in the calculation of the iteration limit could lead to an immediate return without any iterations having been performed if the input matrix is sufficiently big.

* Fix integer overflow in SBDSQR

As noted in lapack issue 135, an integer overflow in the calculation of the iteration limit could lead to an immediate return without any iterations having been performed if the input matrix is sufficiently big.

* Fix integer overflow in threshold calculation

Related to lapack issue 135, the threshold calculation can overflow as well as the multiplication is evaluated from left to right.
Without explicit parentheses, the calculation would overflow for N >= 18919

* Fix integer overflow in threshold calculation

Related to lapack issue 135, the threshold calculation can overflow as well as the multiplication is evaluated from left to right.
Without explicit parentheses, the calculation would overflow for N >= 18919
lapack-netlib/SRC/dbdsqr.f
lapack-netlib/SRC/sbdsqr.f