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

eigen accuracy #45

Closed
edljk opened this issue Aug 19, 2024 · 1 comment
Closed

eigen accuracy #45

edljk opened this issue Aug 19, 2024 · 1 comment

Comments

@edljk
Copy link

edljk commented Aug 19, 2024

I was surprised by the loss of accuracy computing small eigenvalues / eigenvectors with respect to BigFloat:

using MultiFloats, LinearAlgebra, GenericLinearAlgebra
setprecision(BigFloat, precision(Float64x8))
for T   [Float64, Float64x4, Float64x6, Float64x8, BigFloat]
    A = Hermitian(rand(T, 10, 10))
    l, E = eigen(A)
    err = norm(A * E - l' .* E, Inf)
    @show T 
    @show Float64.((err, eps(T)))
end

which produces on my laptop

T = Float64
Float64.((err, eps(T))) = (1.9984014443252818e-15, 2.220446049250313e-16)
T = MultiFloat{Float64, 4}
Float64.((err, eps(T))) = (1.3773321015224588e-62, 2.4308653429145085e-63)
T = MultiFloat{Float64, 6}
Float64.((err, eps(T))) = (2.341425747879783e-71, 1.1985091468012028e-94)
T = MultiFloat{Float64, 8}
Float64.((err, eps(T))) = (1.886488663970321e-84, 5.909106315382871e-126)
T = BigFloat
Float64.((err, eps(T))) = (3.606632272572553e-129, 3.606632272572553e-130)

Could it be related to some normalization issue?
Thanks!

@dzhang314
Copy link
Owner

Hey @edljk, thanks for your interest in MultiFloats.jl! I believe this is related to issue #42, so if it is alright with you, I would like to close this issue and continue the discussion on that thread.

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

2 participants