diff options
author | Gard Spreemann <gspr@nonempty.org> | 2020-07-30 10:17:26 +0200 |
---|---|---|
committer | Gard Spreemann <gspr@nonempty.org> | 2020-07-30 10:17:26 +0200 |
commit | 948eeb222981044da4fcb53c88abd505c2c9f9f8 (patch) | |
tree | 819bd1ff1969d1ed4eba39ac4198b03705b4e7a0 /debian | |
parent | 9e9096ec422001470fa8055568d91de4503c6de9 (diff) |
Add patch from SciPy for bug #966448.
Diffstat (limited to 'debian')
-rw-r--r-- | debian/patches/0003-Prevent-bound-violation.patch | 27 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 28 insertions, 0 deletions
diff --git a/debian/patches/0003-Prevent-bound-violation.patch b/debian/patches/0003-Prevent-bound-violation.patch new file mode 100644 index 0000000..04a4acc --- /dev/null +++ b/debian/patches/0003-Prevent-bound-violation.patch @@ -0,0 +1,27 @@ +From: Gard Spreemann <gspr@nonempty.org> +Date: Thu, 30 Jul 2020 10:15:21 +0200 +Subject: Prevent bound violation. + +This is based on SciPy's commits + cb9ed45d1a25d77204c737a8e1489dfb9606241f + e5ffa787555a60caf2ed9d0046a9ab782457fea4 +--- + lbfgsb.f | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/lbfgsb.f b/lbfgsb.f +index 008370d..7c6b7fc 100644 +--- a/lbfgsb.f ++++ b/lbfgsb.f +@@ -2569,8 +2569,11 @@ c Line search is impossible. + if (stp .eq. one) then + call dcopy(n,z,1,x,1) + else ++c take step and prevent rounding error beyond bound + do 41 i = 1, n + x(i) = stp*d(i) + t(i) ++ if (nbd(i).eq.1.or.nbd(i).eq.2) x(i) = max(x(i), l(i)) ++ if (nbd(i).eq.2.or.nbd(i).eq.3) x(i) = min(x(i), u(i)) + 41 continue + endif + else diff --git a/debian/patches/series b/debian/patches/series index 6d5db6c..b3574bc 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ replace-linpack-with-lapack.patch silence.patch +0003-Prevent-bound-violation.patch |