Adjust tolerance

This commit is contained in:
Nuwan Yapa 2025-02-19 14:14:51 -05:00
parent df8ed2fe12
commit a93056d173
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ end
"Find all bound energies between E_min (=850.0) and E_max (=938.0) where "Find all bound energies between E_min (=850.0) and E_max (=938.0) where
tol_digits determines the precision for root finding and the threshold for identifying duplicates, tol_digits determines the precision for root finding and the threshold for identifying duplicates,
the other parameters are the same from dirac!(...)." the other parameters are the same from dirac!(...)."
function findEs(κ, p::Bool, s::system, E_min=850.0, E_max=938.0, tol_digits=5) function findEs(κ, p::Bool, s::system, E_min=850.0, E_max=938.0; tol_digits=8)
func = determinantFunc(κ, p, s) func = determinantFunc(κ, p, s)
Es = find_all_zeros(func, E_min, E_max; partitions=20, tol=1/10^tol_digits) Es = find_all_zeros(func, E_min, E_max; partitions=20, tol=1/10^tol_digits)
return unique(E -> round(E; digits=tol_digits), Es) return unique(E -> round(E; digits=tol_digits), Es)