I am using Julia version 1.5.0
In exercise 11.2, when I run
@assert A_eigv == [-128.49322764802145, -55.887784553056875, 42.7521672793189, 87.16111477514521, 542.4677301466143]
is true. But when I run the solution of exercise
eigdec = eigen(A)eigdec.valuesA_diag = Diagonal(eigdec.values)@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]
ther output is
`AssertionError: 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]
Stacktrace:
[2] include_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1091`
I think the implementation is correct but want to confirm.
I am thinking if we need to increase the accuracy of the result or use other numbers.
I am using Julia version 1.5.0 In exercise 11.2, when I run
@assert A_eigv == [-128.49322764802145, -55.887784553056875, 42.7521672793189, 87.16111477514521, 542.4677301466143]
is true. But when I run the solution of exercise
eigdec = eigen(A)
eigdec.values
A_diag = Diagonal(eigdec.values)
@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]
ther output is `AssertionError: 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] Stacktrace:[2] include_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1091` I think the implementation is correct but want to confirm. I am thinking if we need to increase the accuracy of the result or use other numbers.