padic_radix_sqrt, padic_radix_rsqrt
#include <flint/padic_radix.h>int padic_radix_sqrt(padic_radix_t res, const padic_radix_t x, gr_ctx_t ctx)sourceint padic_radix_rsqrt(padic_radix_t res, const padic_radix_t x, gr_ctx_t ctx)sourceSet res to a square root \sqrt x, respectively 1/\sqrt x, with relative precision equal to that of x (one digit less for p = 2), capped by the context. The root is a fixed canonical branch, so that a result at lower precision is the truncation of the result at higher precision, and rsqrt gives the reciprocal of sqrt. An exact perfect square gives its exact root. Return GR_DOMAIN if x has odd valuation or its unit is not a square (and for rsqrt if x is an exact zero), and GR_UNABLE if x is not known to be nonzero, if p = 2 and the unit is known to fewer than 3 digits, or if the context is exact and the root is irrational. sqrt of an exact zero is zero.
Guides#
The FLINT team, “padic_radix_sqrt, padic_radix_rsqrt (padic_radix.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/padic_radix/padic_radix_sqrt.html (generated 2026-10-20).
@misc{flint-doc-padic-radix-padic-radix-sqrt,
author = {{The FLINT team}},
title = {{padic\_radix\_sqrt, padic\_radix\_rsqrt (padic\_radix.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/padic_radix/padic_radix_sqrt.html},
note = {Generated 2026-10-20}
}