ca_sqrt_inert, ca_sqrt_nofactor, ca_sqrt_factor, ca_sqrt
#include <flint/ca.h>Sets res to the principal square root of x, with and for negative real .
The inert version returns the generator of the field without trying to simplify. The nofactor version tries cheap simplifications, in particular an exact evaluation of as an algebraic number of moderate degree. The factor version also writes by factoring the representation of (with the factorisation options flags, see ca_factor) and returns with the sign chosen to give the principal root; the factorisation is a heuristic and need not be minimal. ca_sqrt currently calls ca_sqrt_factor with CA_FACTOR_POLY_SQF | CA_FACTOR_ZZ_SMOOTH, so that for example becomes .
For special values: , , and Undefined and Unknown map to themselves.
Guides#
The FLINT team, “ca_sqrt_inert, ca_sqrt_nofactor, ca_sqrt_factor, ca_sqrt (ca.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/ca/ca_sqrt_inert.html (generated 2026-11-02).
@misc{flint-doc-ca-ca-sqrt-inert,
author = {{The FLINT team}},
title = {{ca\_sqrt\_inert, ca\_sqrt\_nofactor, ca\_sqrt\_factor, ca\_sqrt (ca.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/ca/ca_sqrt_inert.html},
note = {Generated 2026-11-02}
}