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 atan⁡x\operatorname{atan} x.

The logarithm version writes atan⁡x=i2(log⁡(1−ix)−log⁡(1+ix))\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 Q(atan⁡x)\mathbb{Q}(\operatorname{atan} x), possibly after transforming the argument. Simple algebraic arguments such as 11 or 3\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: atan⁡(±i)=±i∞\operatorname{atan}(\pm i) = \pm i \infty, atan⁡(c∞)=csgn⁡(c)π/2\operatorname{atan}(c \infty) = \operatorname{csgn}(c) \pi / 2, and atan⁡(∞~)\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-11-02).