P-Adic square roots: Difference between revisions
m
→{{header|Julia}}
Line 622:
while dot(a1, a1) > dot(a2, a2)
q = dot(a1, a2) // dot(a2, a2)
a1, a2 = a2, a1 -
end
if dot(a1, a1) < N
Line 654:
for (num1, den1, P, K) in DATA
Qp = PadicField(P, K)
a = Qp(QQ
c = sqrt(a)
r = toRational(c * c)
|