Skip to content

Commit

Permalink
issquare_with_root -> issquare_with_square_root
Browse files Browse the repository at this point in the history
  • Loading branch information
fieker authored and thofma committed Jan 26, 2021
1 parent 6ce6e11 commit 6f703f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/Misc/Integer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -497,19 +497,19 @@ function issquare(x::fmpq)
return x > 0 && issquare(numerator(x)) && issquare(denominator(x))
end

function issquare_with_root(x::fmpq)
function issquare_with_square_root(x::fmpq)
if x < 0
return false, x
else
fl, n = issquare_with_root(numerator(x))
fl, n = issquare_with_square_root(numerator(x))
!fl && return false, x
fl, d = issquare_with_root(denominator(x))
fl, d = issquare_with_square_root(denominator(x))
!fl && return false, x
return true, fmpq(n, d)
end
end

function issquare_with_root(x::fmpz)
function issquare_with_square_root(x::fmpz)
if !issquare(x)
return false, x
else
Expand Down
2 changes: 1 addition & 1 deletion src/NumField/NfAbs/Elem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ Tests if $a$ is a square and return the root if possible.
"""
issquare(a::nf_elem) = ispower(a, 2)

issquare_with_root(a::NumFieldElem) = issquare(a)
issquare_with_square_root(a::NumFieldElem) = issquare(a)

@doc Markdown.doc"""
sqrt(a::nf_elem) -> nf_elem
Expand Down
2 changes: 1 addition & 1 deletion src/QuadForm/Quad/Spaces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ function _isisotropic_with_vector(F::MatrixElem)
end
end

fl, y = issquare_with_root(-D[1]//D[2])
fl, y = issquare_with_square_root(-D[1]//D[2])
if fl
return true, elem_type(K)[T[1, k] + y * T[2, k] for k in 1:ncols(T)]
elseif length(D) == 2
Expand Down

0 comments on commit 6f703f8

Please sign in to comment.