FLINT3.7.0-dev

gr_floor, gr_ceil, gr_trunc, gr_nint

Synopsis#include <flint/gr.h>
int gr_floor(gr_ptr res, gr_srcptr x, gr_ctx_t ctx)source
int gr_ceil(gr_ptr res, gr_srcptr x, gr_ctx_t ctx)source
int gr_trunc(gr_ptr res, gr_srcptr x, gr_ctx_t ctx)source
int gr_nint(gr_ptr res, gr_srcptr x, gr_ctx_t ctx)source

Set res to the integer obtained by rounding x towards -\infty, +\infty, zero, or to the nearest integer with ties to even. For complex balls (acb) the real part is rounded and the result is real.

Cite this page

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