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, as a quotient of a sine and a cosine, in terms of complex exponentials, or directly as the generator of \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 has the value \tilde \infty at its poles (n + \frac{1}{2}) \pi; \tan(c \infty) = i if \operatorname{Im}(c) > 0 and -i if \operatorname{Im}(c) < 0; \tan(\pm \infty), \tan(\tilde \infty) and \tan(\text{Undefined}) are Undefined; \tan(\text{Unknown}) and \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-10-20).