nfloat_set_ui, nfloat_set_si, nfloat_set_fmpz, nfloat_set_fmpq, nfloat_set_d
Synopsis
#include <flint/nfloat.h>int nfloat_set_ui(nfloat_ptr res, ulong x, gr_ctx_t ctx)sourceint nfloat_set_si(nfloat_ptr res, slong x, gr_ctx_t ctx)sourceint nfloat_set_fmpz(nfloat_ptr res, const fmpz_t x, gr_ctx_t ctx)sourceint nfloat_set_fmpq(nfloat_ptr res, const fmpq_t v, gr_ctx_t ctx)sourceint nfloat_set_d(nfloat_ptr res, double x, gr_ctx_t ctx)sourceSet res to an integer, a rational number or a double, rounded to the precision of the context (toward zero, or in the direction of the context's directed rounding).
Guides#
Cite this page
The FLINT team, “nfloat_set_ui, nfloat_set_si, nfloat_set_fmpz, nfloat_set_fmpq, nfloat_set_d (nfloat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nfloat/nfloat_set_ui.html (generated 2026-10-20).
@misc{flint-doc-nfloat-nfloat-set-ui,
author = {{The FLINT team}},
title = {{nfloat\_set\_ui, nfloat\_set\_si, nfloat\_set\_fmpz, nfloat\_set\_fmpq, nfloat\_set\_d (nfloat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/nfloat/nfloat_set_ui.html},
note = {Generated 2026-10-20}
}