FLINT3.7.0-dev

gr_big_o_base_fmpz

Synopsis#include <flint/gr.h>
int gr_big_o_base_fmpz(gr_ptr res, gr_srcptr x, const fmpz_t n, gr_ctx_t ctx)source

Sets res to the error term O(x^n), where x is the generator of a power series ring or the base p of a p-adic ring. Returns GR_UNABLE in rings that cannot represent such a term (for example an exact polynomial ring).

If x is not the generator of ctx, the ring searches its base rings: in (R[[x]])[[y]], O(x^2) means O(x^2) y^0, so that nested error terms such as (x + O(x^5)) + (3 + x + O(x^4)) y^2 + O(y^5) can be built. gr_set_str parses O(x^n) by calling this function with x and n, without evaluating the power x^n.

Cite this page

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