fmpz_mpoly_set_str_pretty
#include <flint/fmpz_mpoly.h>int fmpz_mpoly_set_str_pretty(fmpz_mpoly_t A, const char * str, const char ** x, const fmpz_mpoly_ctx_t ctx)sourceSets A to the polynomial given by the expression str in the variables named by x, and returns 0, or returns if the string cannot be parsed. The expression may contain nonnegative integer constants, the variable names, +, - (binary or unary), *, /, ^, parentheses and spaces. Division must be exact, and ^ must be followed immediately by a nonnegative integer exponent; powers associate to the left. Implicit multiplication such as 2x is not supported. Variable names are matched greedily, longest first. On failure the value of A is unspecified.
Guides#
The FLINT team, “fmpz_mpoly_set_str_pretty (fmpz_mpoly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_mpoly/fmpz_mpoly_set_str_pretty.html (generated 2026-11-02).
@misc{flint-doc-fmpz-mpoly-fmpz-mpoly-set-str-pretty,
author = {{The FLINT team}},
title = {{fmpz\_mpoly\_set\_str\_pretty (fmpz\_mpoly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz_mpoly/fmpz_mpoly_set_str_pretty.html},
note = {Generated 2026-11-02}
}