Definition at line 142 of file ARingRRRTest.cpp.
143{
147 R.init(a);
148 R.init(b);
149 R.init(c);
150 R.init(e);
151 for (
int i = 0; i <
ntrials; i++)
152 {
153
154 gen.nextElement(a);
155 gen.nextElement(b);
156 R.subtract(c, a, b);
157 R.add(e, c, b);
159 R.mult(e, a, b);
160 R.subtract_multiple(e, a, b);
161 EXPECT_TRUE(R.is_zero(e));
162 }
163 R.clear(e);
164 R.clear(c);
165 R.clear(b);
166 R.clear(a);
167}
bool almostEqual(const M2::ARingRRR &R, int nbits, const M2::ARingRRR::ElementType &a, const M2::ARingRRR::ElementType &b)
aring-style adapter for arbitrary-precision real numbers, backed by MPFR.
References M2::ARingRRR::add(), almostEqual(), M2::ARingRRR::clear(), M2::ARingRRR::init(), M2::ARingRRR::is_zero(), M2::ARingRRR::mult(), ARingElementGenerator< RingType >::nextElement(), ntrials, M2::ARingRRR::subtract(), subtract(), and M2::ARingRRR::subtract_multiple().