FLINT3.7.0-dev

nfloat_floor, nfloat_ceil, nfloat_trunc, nfloat_nint

Synopsis#include <flint/nfloat.h>
int nfloat_floor(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)source
int nfloat_ceil(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)source
int nfloat_trunc(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)source
int nfloat_nint(nfloat_ptr res, nfloat_srcptr x, gr_ctx_t ctx)source

Round x to an integer toward -\infty, toward +\infty, toward zero, or to the nearest integer (ties to even). The results are exact.

Guides#

Cite this page

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