FLINT3.7.0-dev

ca_floor, ca_ceil

Synopsis#include <flint/ca.h>
void ca_floor(ca_t res, const ca_t x, ca_ctx_t ctx)source
void ca_ceil(ca_t res, const ca_t x, ca_ctx_t ctx)source

Sets res to \lfloor x \rfloor or \lceil x \rceil; for a nonreal number, of its real part. The integer is determined numerically when the real part is not too close to an integer; otherwise the result is the generator of the field \mathbb{Q}(\lfloor x \rfloor). All infinities give Undefined.

Guides#

Cite this page

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