padic_sqrt
#include <flint/padic.h>int padic_sqrt(padic_t rop, const padic_t op, const padic_ctx_t ctx)sourceReturns whether op is a square in and in that case sets rop to a square root, reduced. If the return value is 0, the value of rop is undefined.
A nonzero is a square if and only if is even and the unit is a square in ; for odd this holds if and only if is a square modulo , and for if and only if . The root is times a square root of modulo , obtained from a root modulo (or the congruence modulo 8) by Hensel lifting of the inverse square root (Hensel lifting of inverses, square roots and Teichmüller lifts). The decision is made from the exact value of op even when the precision of rop is too small to hold a nonzero root.
The FLINT team, “padic_sqrt (padic.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/padic/padic_sqrt.html (generated 2026-11-02).
@misc{flint-doc-padic-padic-sqrt,
author = {{The FLINT team}},
title = {{padic\_sqrt (padic.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/padic/padic_sqrt.html},
note = {Generated 2026-11-02}
}