FLINT3.7.0-dev

ca_check_is_real, ca_check_is_negative_real, ca_check_is_imaginary

Synopsis#include <flint/ca.h>
truth_t ca_check_is_real(const ca_t x, ca_ctx_t ctx)source
truth_t ca_check_is_negative_real(const ca_t x, ca_ctx_t ctx)source
truth_t ca_check_is_imaginary(const ca_t x, ca_ctx_t ctx)source

Checks whether x is a real number, a negative real number, or a purely imaginary number (\operatorname{Re}(x) = 0; zero counts as imaginary). These functions return T_FALSE for all special values, including infinities with a real or imaginary sign, and T_UNKNOWN for Unknown.

Numerical evaluation disproves, and also proves when the ball has an exactly zero imaginary (or real) part, which happens when the expression is real by construction. Otherwise ca_check_is_real tries to prove x = \overline{x} by comparing x with its deep conjugate (ca_conj_deep), and an exact evaluation as an algebraic number.

Guides#

Cite this page

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