lapack/native: remove unused variables in Dlasq2 and Dlasq5
MODIFY
lapack/native/dlasq2.go
lapack/native/dlasq2.go
@@ -83,7 +83,7 @@ func (impl Implementation) Dlasq2(n int, z []float64) (info int) {
// Check for negative data and compute sums of q's and e's.
z[2*n-1] = 0
emin := z[1]
- var d, e, qmax, zmax float64
+ var d, e, qmax float64
var i1, n1 int
for k := 0; k < 2*(n-1); k += 2 {
if z[k] < 0 || z[k+1] < 0 {
@@ -93,14 +93,12 @@ func (impl Implementation) Dlasq2(n int, z []float64) (info int) {
e += z[k+1]
qmax = math.Max(qmax, z[k])
emin = math.Min(emin, z[k+1])
- zmax = math.Max(math.Max(qmax, zmax), z[k+1])
}
if z[2*(n-1)] < 0 {
panic("lapack: bad z value")
}
d += z[2*(n-1)]
qmax = math.Max(qmax, z[2*(n-1)])
- zmax = math.Max(qmax, zmax)
// Check for diagonality.
if e == 0 {
for k := 1; k < n; k++ {

MODIFY
lapack/native/dlasq5.go
lapack/native/dlasq5.go
@@ -28,7 +28,8 @@ func (impl Implementation) Dlasq5(i0, n0 int, z []float64, pp int, tau, sigma fl
emin = z[j4+4]
d := z[j4] - tau
dmin = d
- dmin1 = -z[j4]
+ // In the reference there are code paths that actually return this value.
+ // dmin1 = -z[j4]
if pp == 0 {
for j4loop := 4 * (i0 + 1); j4loop <= 4*((n0+1)-3); j4loop += 4 {
j4 := j4loop - 1
@@ -73,7 +74,8 @@ func (impl Implementation) Dlasq5(i0, n0 int, z []float64, pp int, tau, sigma fl
emin = z[j4+4]
d := z[j4] - tau
dmin = d
- dmin1 = -z[j4]
+ // In the reference there are code paths that actually return this value.
+ // dmin1 = -z[j4]
if pp == 0 {
for j4loop := 4 * (i0 + 1); j4loop <= 4*((n0+1)-3); j4loop += 4 {
j4 := j4loop - 1

lapack/native: remove unused variables in Dlasq2 and Dlasq5