17 mpz_ptr f1 =
static_cast<mpz_ptr
>(
const_cast<ElementType*
>(&f));
30 bool is_neg = (mpz_cmp_si(&a, 0) == -1);
31 bool is_one = (mpz_cmp_si(&a, 1) == 0 || mpz_cmp_si(&a, -1) == 0);
33 if (!is_neg && p_plus) o <<
'+';
41 str = mpz_get_str(
static_cast<char*
>(
nullptr), 10, &a);
60 if (mpz_cmp_ui(&b, 1) == 0)
66 if (mpz_cmp_si(&b, -1) == 0)
M2::ARingZZGMP — aring integer ring backed straight by GMP mpz_t.
void init(ElementType &result) const
void eval(const RingMap *map, const ElementType &f, int first_var, ring_elem &result) const
void syzygy(const ElementType &a, const ElementType &b, ElementType &x, ElementType &y) const
static void clear(ElementType &result)
void set(ElementType &result, const ElementType &a) const
void set_zero(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 negate(ElementType &result, const ElementType &a) const
void divide(ElementType &result, const ElementType &a, const ElementType &b) const
exact division of integers.
void set_from_long(ElementType &result, long a) const
bool is_zero(const ElementType &f) const
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.