We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 244d7a6 commit 010f817Copy full SHA for 010f817
test/Rings-test.jl
@@ -63,6 +63,16 @@ end
63
end
64
65
66
+@testset "sqrt" begin
67
+ Base.sqrt(a::EuclideanRingResidueRingElem{BigInt}) = parent(a)(BigInt(sqrt(a.data)))
68
+ R = residue_ring(ZZ, 101)[1]
69
+
70
+ @test sqrt(R(81), check=true) == R(9)
71
+ @test_throws ErrorException sqrt(R(82), check=true)
72
+ @test is_square_with_sqrt(R(16)) == (true, R(4))
73
+ @test is_square_with_sqrt(R(15))[1] == false
74
+end
75
76
@testset "properties" begin
77
@test is_perfect(QQ)
78
@test is_perfect(GF(2))
0 commit comments