FLINT3.7.0-dev

ca_atan_logarithm, ca_atan_direct, ca_atan

Synopsis#include <flint/ca.h>
void ca_atan_logarithm(ca_t res, const ca_t x, ca_ctx_t ctx)source
void ca_atan_direct(ca_t res, const ca_t x, ca_ctx_t ctx)source
void ca_atan(ca_t res, const ca_t x, ca_ctx_t ctx)source

Sets res to the principal branch of \operatorname{atan} x.

The logarithm version writes \operatorname{atan} x = \frac{i}{2} (\log(1 - ix) - \log(1 + ix)) (in a form that respects the branch cuts), the direct version returns the generator of \mathbb{Q}(\operatorname{atan} x), possibly after transforming the argument. Simple algebraic arguments such as 1 or \sqrt{3} give rational multiples of \pi. ca_atan uses the logarithm form unless CA_OPT_TRIG_FORM is CA_TRIG_DIRECT.

For special values: \operatorname{atan}(\pm i) = \pm i \infty, \operatorname{atan}(c \infty) = \operatorname{csgn}(c) \pi / 2, and \operatorname{atan}(\tilde \infty) is Undefined.

Guides#

Cite this page

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