40#include <gtest/gtest.h>
93 for (
int i = 0; i <
ntrials; i++)
122 for (
int i = 0; i <
ntrials; i++)
149 for (
int i = 0; i <
ntrials; i++)
172 std::cout.precision(30);
181 for (
int i = 0; i <
ntrials; i++)
214 for (
int i = 0; i <
ntrials; i++)
271 for (
int i = 0; i <
ntrials; i++)
283 R.
power(d, a, e1 + e2);
288 mpz_set_si(gmp1, e1);
void testRingNegateRR(const M2::ARingRR &R, int ntrials)
void getElement< M2::ARingRR >(const M2::ARingRR &R, int index, M2::ARingRR::ElementType &result)
bool almostEqual(const M2::ARingRR &R, unsigned long nbits, const M2::ARingRR::ElementType &a, const M2::ARingRR::ElementType &b)
std::string ringName(const T &R)
Shared gtest harness for the ARing*Test.cpp suite.
M2::ARingRR — machine-precision real numbers (IEEE 754 double).
void nextElement(typename RingType::ElementType &result)
void init(ElementType &result) const
int compare_elems(const ElementType &f, const ElementType &g) const
void mult(ElementType &result, const ElementType &a, const ElementType &b) const
void divide(ElementType &result, const ElementType &a, const ElementType &b) const
bool is_zero(const ElementType &f) const
void negate(ElementType &result, const ElementType &a) const
size_t characteristic() const
void subtract_multiple(ElementType &result, const ElementType &a, const ElementType &b) const
static void clear(ElementType &result)
unsigned long get_precision() const
void abs(ElementType &result, const ElementType &a) const
void power(ElementType &result, const ElementType &a, int n) const
void set_from_long(ElementType &result, long a) const
void power_mpz(ElementType &result, const ElementType &a, mpz_srcptr n) const
void add(ElementType &result, const ElementType &a, const ElementType &b) const
void subtract(ElementType &result, const ElementType &a, const ElementType &b) const
void random(ElementType &result) const
bool is_equal(const ElementType &f, const ElementType &g) const
aring-style adapter for double-precision real numbers.
void subtract(int &result, int a, int b)
VALGRIND_MAKE_MEM_DEFINED & result(result)
int32_t rawRandomInt(int32_t max)