43 if (index < 50)
return R.
from_long(index - 25);
48 mpz_set_str(
maxH,
"100000000000", 10);
59 EXPECT_TRUE(R !=
nullptr);
61 EXPECT_TRUE(
dynamic_cast<const Z_mod *
>(R) ==
nullptr);
62 EXPECT_TRUE(
dynamic_cast<const RingQQ *
>(R) !=
nullptr);
64 EXPECT_FALSE(R->
is_ZZ());
std::string ringName(const T &R)
static bool maxH_initialized
ring_elem getElement< RingQQ >(const RingQQ &R, int index)
void testRingPower(const T *R, int ntrials)
void testRingDivide(const T *R, int ntrials)
void testRingSyzygy(const T *R, int ntrials)
void testRingAxioms(const T *R, int ntrials)
void testRingAdd(const T *R, int ntrials)
void testRingSubtract(const T *R, int ntrials)
void testRingNegate(const T *R, int ntrials)
Shared gtest fixture for the legacy Ring-based Ring*Test.cpp suite.
Legacy Z_mod — a Ring-derived Z/p with log / exp tables.
ConcreteRing<RingType> — the templated bridge between aring and the legacy Ring API.
virtual ring_elem from_long(long n) const
virtual bool from_rational(mpq_srcptr q, ring_elem &result) const
virtual bool is_ZZ() const
virtual bool is_equal(const ring_elem f, const ring_elem g) const =0
virtual ring_elem from_long(long n) const =0
ring_elem minus_one() const
virtual bool is_zero(const ring_elem f) const =0
virtual CoefficientType coefficient_type() const
Engine-side Z/p ring for small primes (p < 32767), using a discrete-log (Zech) representation.
void subtract(int &result, int a, int b)
VALGRIND_MAKE_MEM_DEFINED & result(result)
std::ostringstream & ones(std::ostringstream &o, int len)
gmp_QQ rawRandomQQ(gmp_ZZ height)