FLINT3.7.0-dev

fmpz_mpoly_set_str_pretty

Synopsis#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)source

Sets A to the polynomial given by the expression str in the variables named by x, and returns 0, or returns -1 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#

Cite this page

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-10-20).