Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in Factorizations Notebook #15

Open
4ndr3lu15 opened this issue Oct 15, 2022 · 0 comments
Open

Bug in Factorizations Notebook #15

4ndr3lu15 opened this issue Oct 15, 2022 · 0 comments

Comments

@4ndr3lu15
Copy link

When the @Assert is called at 11.2, it will not approve the result.
That is, where we see:

@assert A_diag ==  [-128.493    0.0      0.0      0.0       0.0;
             0.0    -55.8878   0.0      0.0       0.0;
             0.0      0.0     42.7522   0.0       0.0;
             0.0      0.0      0.0     87.1611    0.0;
             0.0      0.0      0.0      0.0     542.468] 

Will return false. The reason is this expression does not consider the minor terms of the floats.
When I make the following:

A_diag - [-128.493    0.0      0.0      0.0       0.0;
             0.0    -55.8878   0.0      0.0       0.0;
             0.0      0.0     42.7522   0.0       0.0;
             0.0      0.0      0.0     87.1611    0.0;
             0.0      0.0      0.0      0.0     542.468] 

The result is:

5×5 Matrix{Float64}:
 -0.000227648  0.0          0.0         0.0          0.0
  0.0          1.54469e-5   0.0         0.0          0.0
  0.0          0.0         -3.27207e-5  0.0          0.0
  0.0          0.0          0.0         1.47751e-5   0.0
  0.0          0.0          0.0         0.0         -0.000269853

So it is impossible to correctly answer the exercise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant