From 4decc8003d4965af8eeec8b17d52e785d1ee57f5 Mon Sep 17 00:00:00 2001 From: Vollkornaffe Date: Fri, 8 Mar 2024 17:17:08 +0100 Subject: [PATCH] fix: Normalize the column once more The column may not be normalized if the `factor` is on a scale of 1e-40. Possibly, f32 just runs out of precision. There is likely a better solution to the problem. --- src/linalg/householder.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/linalg/householder.rs b/src/linalg/householder.rs index 79d7c768..13385035 100644 --- a/src/linalg/householder.rs +++ b/src/linalg/householder.rs @@ -34,6 +34,7 @@ pub fn reflection_axis_mut>( if !factor.is_zero() { column.unscale_mut(factor.sqrt()); + let _ = column.normalize_mut(); (-signed_norm, true) } else { // TODO: not sure why we don't have a - sign here.