FLINT3.7.0-dev

ca_tan_sine_cosine, ca_tan_exponential, ca_tan_direct, ca_tan

Synopsis#include <flint/ca.h>
void ca_tan_sine_cosine(ca_t res, const ca_t x, ca_ctx_t ctx)source
void ca_tan_exponential(ca_t res, const ca_t x, ca_ctx_t ctx)source
void ca_tan_direct(ca_t res, const ca_t x, ca_ctx_t ctx)source
void ca_tan(ca_t res, const ca_t x, ca_ctx_t ctx)source

Sets res to tan⁡x\tan x, as a quotient of a sine and a cosine, in terms of complex exponentials, or directly as the generator of Q(tan⁡x)\mathbb{Q}(\tan x) (possibly after a transformation of the argument). ca_tan uses the form selected by CA_OPT_TRIG_FORM. Simple algebraic values simplify to elements of number fields.

For special values: tan⁡\tan has the value ∞~\tilde \infty at its poles (n+12)π(n + \frac{1}{2}) \pi; tan⁡(c∞)=i\tan(c \infty) = i if Im⁡(c)>0\operatorname{Im}(c) > 0 and −i-i if Im⁡(c)<0\operatorname{Im}(c) < 0; tan⁡(±∞)\tan(\pm \infty), tan⁡(∞~)\tan(\tilde \infty) and tan⁡(Undefined)\tan(\text{Undefined}) are Undefined; tan⁡(Unknown)\tan(\text{Unknown}) and cot⁡(Unknown)\cot(\text{Unknown}) are Unknown.

Cite this page

The FLINT team, “ca_tan_sine_cosine, ca_tan_exponential, ca_tan_direct, ca_tan (ca.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/ca/ca_tan_sine_cosine.html (generated 2026-11-02).