mirror of
https://github.com/kalmarek/SmallHyperbolic
synced 2024-11-30 17:15:28 +01:00
move safe_eigvals
This commit is contained in:
parent
6cd237bb8e
commit
d781aa46a9
@ -68,16 +68,6 @@ function load_principal_repr(i, q = 109; CC = AcbField(PRECISION))
|
||||
return a, b
|
||||
end
|
||||
|
||||
function safe_eigvals(m::acb_mat)
|
||||
evs = eigvals(m)
|
||||
all(isfinite.(evs)) && return evs
|
||||
CC = base_ring(m)
|
||||
X = matrix(CC, rand(CC, size(m)))
|
||||
evs = eigvals(X * m * inv(X))
|
||||
all(isfinite.(evs)) && return evs
|
||||
throw(ArgumentError("Could not compute eigenvalues"))
|
||||
end
|
||||
|
||||
if !isinteractive()
|
||||
|
||||
for i = 0:27
|
||||
|
@ -163,3 +163,14 @@ function _count_multiplicites(evs)
|
||||
rev = true,
|
||||
)
|
||||
end
|
||||
|
||||
function safe_eigvals(m::acb_mat)
|
||||
evs = eigvals(m)
|
||||
all(isfinite.(evs)) && return evs
|
||||
CC = base_ring(m)
|
||||
X = matrix(CC, rand(CC, size(m)))
|
||||
evs = eigvals(X * m * inv(X))
|
||||
return evs
|
||||
all(isfinite.(evs)) && return evs
|
||||
throw(ArgumentError("Could not compute eigenvalues"))
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user