Skip to content

Commit

Permalink
fix: Normalize the column once more
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Vollkornaffe committed Mar 8, 2024
1 parent 4a5855a commit 4decc80
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/linalg/householder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pub fn reflection_axis_mut<T: ComplexField, D: Dim, S: StorageMut<T, D>>(

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.
Expand Down

0 comments on commit 4decc80

Please sign in to comment.