Definition at line 169 of file ARingRRRTest.cpp.
170{
174 R.init(a);
175 R.init(b);
176 R.init(c);
177 R.init(d);
178 for (
int i = 0; i <
ntrials; i++)
179 {
180
181 gen.nextElement(a);
182 gen.nextElement(b);
183 R.mult(c, a, b);
184 if (R.is_zero(b))
185 EXPECT_TRUE(R.is_zero(c));
186 else
187 {
188 R.divide(d, c, b);
190 }
191 }
192 R.clear(d);
193 R.clear(c);
194 R.clear(b);
195 R.clear(a);
196}
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 almostEqual(), M2::ARingRRR::clear(), M2::ARingRRR::divide(), M2::ARingRRR::init(), M2::ARingRRR::is_zero(), M2::ARingRRR::mult(), ARingElementGenerator< RingType >::nextElement(), and ntrials.