JuliaLinearAlgebra / ArnoldiMethod.jl

The Arnoldi Method with Krylov-Schur restart, natively in Julia.
https://julialinearalgebra.github.io/ArnoldiMethod.jl/dev
MIT License
96 stars 18 forks source link

Fix bug where number type in stopping criterion was derived from `tol` instead of real(eltype(H)) #137

Closed haampie closed 7 months ago

haampie commented 7 months ago

Previously ArnoldiMethod.jl would accidentially pick eps(typeof(tol)) instead eps(real(typeof(residual)))

So, with bigfloat and tol = 1e-30 you would actually just get eps(Float64) accuracy, whereas tol = big(1e-30) would have given the requested tolerance.

This fixes that.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (2076220) 95.21% compared to head (4cd7904) 95.22%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #137 +/- ## ======================================= Coverage 95.21% 95.22% ======================================= Files 10 10 Lines 815 816 +1 ======================================= + Hits 776 777 +1 Misses 39 39 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.