--- householdercomplex.c 2017-11-27 14:35:24.665197607 +0000 +++ householdercomplex.new.c 2017-11-27 14:35:40.105198153 +0000 @@ -1,6 +1,7 @@ /* linalg/householdercomplex.c * * Copyright (C) 2001, 2007 Brian Gough + * Copyright (C) 2017 Christian Krueger (bugfix in gsl_linalg_complex_householder_hv) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -228,6 +229,19 @@ if (GSL_REAL(tau) == 0.0 && GSL_IMAG(tau) == 0.0) return GSL_SUCCESS; + /* treat the N=1 case separately */ + if (N == 1) + { + gsl_complex w0 = gsl_vector_complex_get(w, 0); + gsl_complex tz = gsl_complex_mul(tau, w0); + gsl_complex ntz = gsl_complex_negative(tz); + gsl_complex w0ntz = gsl_complex_add(w0, ntz); + + gsl_vector_complex_set(w, 0, w0ntz); + + return GSL_SUCCESS; + } + { /* compute z = v'w */