acb_modular_fundamental_domain_approx_d, acb_modular_fundamental_domain_approx_arf
#include <flint/acb_modular.h>void acb_modular_fundamental_domain_approx_d(psl2z_t g, double x, double y, double one_minus_eps)sourcevoid acb_modular_fundamental_domain_approx_arf(psl2z_t g, const arf_t x, const arf_t y, const arf_t one_minus_eps, slong prec)sourceSet g to a transformation that should map x + yi (with y > 0) to the fundamental domain or just outside it, by the classical reduction algorithm in double or arf arithmetic at precision prec. The output is always a valid element of \mathrm{PSL}_2(\mathbb{Z}), but it is not guaranteed to reduce the point; the caller must check the result.
The iteration alternately applies z \gets z + b (with b the nearest integer to -\operatorname{Re}(z)) and z \gets -1/z, and stops when |x| \le 1/2 and x^2 + y^2 \ge 1 - \varepsilon, where 1 - \varepsilon is one_minus_eps. It also stops if too many steps have been taken without convergence, or if the numbers become too large or too small for the working precision.
The FLINT team, “acb_modular_fundamental_domain_approx_d, acb_modular_fundamental_domain_approx_arf (acb_modular.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/acb_modular/acb_modular_fundamental_domain_approx_d.html (generated 2026-10-20).
@misc{flint-doc-acb-modular-acb-modular-fundamental-domain-approx-d,
author = {{The FLINT team}},
title = {{acb\_modular\_fundamental\_domain\_approx\_d, acb\_modular\_fundamental\_domain\_approx\_arf (acb\_modular.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/acb_modular/acb_modular_fundamental_domain_approx_d.html},
note = {Generated 2026-10-20}
}