FLINT3.7.0-dev

ca_set_fexpr

Synopsis#include <flint/ca.h>
int ca_set_fexpr(ca_t res, const fexpr_t expr, ca_ctx_t ctx)source

Sets res to the value of the symbolic expression expr and returns 1, or returns 0 if expr cannot be evaluated.

The expression is evaluated by traversing it with the arithmetic and functions of this module; no symbolic simplification takes place. Supported are integers, decimal literals (Decimal), the constants Pi, NumberI, NumberE, Euler, GoldenRatio, the special values Infinity, UnsignedInfinity, Undefined and Unknown, arithmetic (Pos, Neg, Add, Sub, Mul, Div, Pow), Sqrt, Exp, Log, the trigonometric functions and their inverses, Abs, Sign, Csgn, Arg, Re, Im, Conjugate, Floor, Ceil, Gamma, Erf, Erfc, Erfi, the algebraic number constructors PolynomialRootIndexed, PolynomialRootNearest and AlgebraicNumberSerialized, and Where with Def for local definitions. Every expression produced by ca_get_fexpr can be read.

Guides#

Cite this page

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