FLINT3.7.0-dev

gr_sqrt, gr_rsqrt

Synopsis#include <flint/gr.h>
int gr_sqrt(gr_ptr res, gr_srcptr x, gr_ctx_t ctx)source
int gr_rsqrt(gr_ptr res, gr_srcptr x, gr_ctx_t ctx)source

Set res to a square root \sqrt{x}, respectively 1/\sqrt{x}. Fail with GR_DOMAIN if x is not a square (and for gr_rsqrt if x = 0) and with GR_UNABLE if this cannot be decided, for example for a real ball containing zero.

Guides#

Cite this page

The FLINT team, “gr_sqrt, gr_rsqrt (gr.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr/gr_sqrt.html (generated 2026-10-20).