ca_sin_cos_exponential, ca_sin_cos_direct, ca_sin_cos_tangent, ca_sin_cos
#include <flint/ca.h>Sets res1 to \sin x and res2 to \cos x. Either output may be NULL if only the other function is wanted.
The exponential version writes \sin x = (e^{ix} - e^{-ix})/(2i) and \cos x = (e^{ix} + e^{-ix})/2; rational multiples of \pi then give elements of cyclotomic fields. The direct version returns the generators of \mathbb{Q}(\sin x) and \mathbb{Q}(\cos x) (perhaps after symmetry transformations, which may exchange the two functions), and the tangent version expresses both in terms of t = \tan(x/2) as 2t/(1+t^2) and (1-t^2)/(1+t^2). In the last two versions, very simple algebraic values become elements of real number fields. ca_sin_cos uses the form selected by CA_OPT_TRIG_FORM, exponential by default, which works best for simplification and zero testing although it introduces complex numbers in real computations; CA_TRIG_SINE_COSINE selects the direct form.
For special values: \sin(\pm i \infty) = \pm i \infty, \cos(\pm i \infty) = +\infty, the other infinities give Undefined, and Undefined and Unknown map to themselves.
The FLINT team, “ca_sin_cos_exponential, ca_sin_cos_direct, ca_sin_cos_tangent, ca_sin_cos (ca.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/ca/ca_sin_cos_exponential.html (generated 2026-10-20).
@misc{flint-doc-ca-ca-sin-cos-exponential,
author = {{The FLINT team}},
title = {{ca\_sin\_cos\_exponential, ca\_sin\_cos\_direct, ca\_sin\_cos\_tangent, ca\_sin\_cos (ca.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/ca/ca_sin_cos_exponential.html},
note = {Generated 2026-10-20}
}