30 flint_mpz_init_set_readonly(temp, &f);
32 flint_mpz_clear_readonly(temp);
44 bool is_neg = (fmpz_cmp_si(&a, 0) == -1);
45 bool is_one = (fmpz_cmp_si(&a, 1) == 0 || fmpz_cmp_si(&a, -1) == 0);
47 if (!is_neg && p_plus) o <<
'+';
55 str = fmpz_get_str(
static_cast<char*
>(
nullptr), 10, &a);
73 if (fmpz_cmp_ui(&b, 1) == 0)
79 if (fmpz_cmp_si(&b, -1) == 0)
M2::ARingZZ — FLINT-backed arbitrary-precision integers with small-value inlining.
#define FLINT_RAND_INIT(x)
#define FLINT_RAND_CLEAR(x)
bool is_zero(const ElementType &f) const
void set(ElementType &result, const ElementType &a) const
void negate(ElementType &result, const ElementType &a) const
void set_zero(ElementType &result) const
bool divide(ElementType &result, const ElementType &a, const ElementType &b) const
test doc
void syzygy(const ElementType &a, const ElementType &b, ElementType &x, ElementType &y) const
flint_rand_t mRandomState
void init(ElementType &result) const
void elem_text_out(buffer &o, const ElementType &a, bool p_one=true, bool p_plus=false, bool p_parens=false) const
void eval(const RingMap *map, const ElementType &f, int first_var, ring_elem &result) const
void set_from_long(ElementType &result, long a) const
static void clear(ElementType &result)
virtual ring_elem from_int(mpz_srcptr n) const =0
const Ring * get_ring() const
Engine-side ring homomorphism: stores, for each source-ring variable, the target-ring element it maps...
VALGRIND_MAKE_MEM_DEFINED & result(result)
RingMap — engine representation of a ring homomorphism.