FLINT3.7.0-dev

nfloat_atan, nfloat_atan2

Synopsis#include <flint/nfloat.h>
int nfloat_atan(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)source
int nfloat_atan2(nfloat_ptr res, nfloat_srcptr y, nfloat_srcptr x, gr_ctx_t ctx)source

The arctangent, and the two-argument arctangent \operatorname{atan2}(y, x) \in (-\pi, \pi]. For |x| > 1, atan uses \pi/2 - \operatorname{atan}(1/|x|); atan2 takes the arctangent of the ratio of the smaller and the larger magnitude and adds the octant. \operatorname{atan2}(0, 0) = 0.

Guides#

Cite this page

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