Macaulay2 » Documentation
Packages » Padic » PadicNumber » PadicNumber ^ ZZ » sqrt(PadicNumber)
next | previous | forward | backward | up | index | toc

sqrt(PadicNumber) -- square root of a p-adic number

Description

Returns a square root of a $p$-adic number.

i1 : sqrt QQ_7 2

o1 = 3 + 1*7^1 + 2*7^2 + 6*7^3 + 1*7^4 + 2*7^5 + 1*7^6 + 2*7^7 + 4*7^8 +
     6*7^9 + 6*7^10 + 2*7^11 + 1*7^12 + 1*7^13 + 2*7^15 + 1*7^16 + 1*7^17 +
     4*7^18 + 6*7^19

o1 : QQ  (of precision 20)
       7
i2 : oo^2

o2 = 2

o2 : QQ  (of precision 20)
       7

Caveat

An error is raised if x is not a $p$-adic square.

See also

Ways to use this method:


The source of this document is in /build/reproducible-path/macaulay2-1.26.05+ds/M2/Macaulay2/packages/Padic.m2:838:0.