acb_sqrt, acb_sqrt_analytic
Synopsis
#include <flint/acb.h>Set the output to the principal square root, with the branch cut on (-\infty, 0) and \sqrt{-1} = i (continuous from above). If analytic is set, the result is indeterminate when the input touches the branch cut, including an exact negative real number.
If one part of z = a + bi is exactly zero, a single real square root suffices. In general \sqrt{a + bi} = u/2 + ib/u with u = \sqrt{2(|z| + a)}, which needs two real square roots; for a < 0 the roles of the parts are exchanged to avoid cancellation.
Guides#
Cite this page
The FLINT team, “acb_sqrt, acb_sqrt_analytic (acb.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/acb/acb_sqrt.html (generated 2026-10-20).
@misc{flint-doc-acb-acb-sqrt,
author = {{The FLINT team}},
title = {{acb\_sqrt, acb\_sqrt\_analytic (acb.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/acb/acb_sqrt.html},
note = {Generated 2026-10-20}
}