Skip to content

Commit

Permalink
Update all uses of roots
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens committed May 31, 2023
1 parent 95dc6e7 commit 5969999
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/calcium/qqbar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function qqbar_vec_clear(v::Ptr{qqbar_struct}, n::Int)
Nothing, (Ptr{qqbar_struct}, Int), v, n)
end
function roots(f::ZZPolyRingElem, R::CalciumQQBarField)
function roots(R::CalciumQQBarField, f::ZZPolyRingElem)
deg = degree(f)
if deg <= 0
return Array{qqbar}(undef, 0)
Expand Down
12 changes: 6 additions & 6 deletions test/calcium/qqbar-test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,16 @@ end
@test root_of_unity_as_args(-i) == (4, 3)
@test_throws DomainError root_of_unity_as_args(qqbar(2))

v = roots(x^5-x-1, CalciumQQBar)
v = roots(CalciumQQBar, x^5-x-1)
@test v[1]^5 - v[1] - 1 == 0

v = roots(y^2+1, CalciumQQBar)
v = roots(CalciumQQBar, y^2+1)
@test v == [i, -i]

@test roots(ZZx(0), CalciumQQBar) == []
@test roots(ZZx(1), CalciumQQBar) == []
@test roots(QQy(0), CalciumQQBar) == []
@test roots(QQy(1), CalciumQQBar) == []
@test roots(CalciumQQBar, ZZx(0)) == []
@test roots(CalciumQQBar, ZZx(1)) == []
@test roots(CalciumQQBar, QQy(0)) == []
@test roots(CalciumQQBar, QQy(1)) == []

@test eigenvalues(zero(matrix_space(ZZ, 0, 0)), CalciumQQBar) == []
@test eigenvalues(zero(matrix_space(QQ, 0, 0)), CalciumQQBar) == []
Expand Down

0 comments on commit 5969999

Please sign in to comment.