Definition at line 211 of file ARingRRiTest.cpp.
212{
217 R.init(a);
218 R.init(b);
219 R.init(c);
220 R.init(d);
221 R.init(e);
222
223 for (
int i = 0; i <
ntrials; i++)
224 {
225 gen.nextElement(a);
226 gen.nextElement(b);
227 gen.nextElement(c);
228
229
230
231 R.add(d, a, b);
232 R.add(e, b, a);
233 EXPECT_TRUE(R.is_equal(d,e));
234 R.mult(d, a, b);
235 R.mult(e, b, a);
236 EXPECT_TRUE(R.is_equal(d,e));
237
238
239
240
241 R.add(e, b, c);
242 R.add(d, a, e);
243 R.add(e, a, b);
244 R.add(e, e, c);
246
247 R.mult(e, b, c);
248 R.mult(d, a, e);
249 R.mult(e, a, b);
250 R.mult(e, e, c);
251
253
254
255
256 R.add(e, b, c);
257 R.mult(d, a, e);
258 R.mult(b, a, b);
259 R.mult(c, a, c);
260 R.add(e, b, c);
261
263 }
264 R.clear(e);
265 R.clear(d);
266 R.clear(c);
267 R.clear(b);
268 R.clear(a);
269}
bool almostEqual(const M2::ARingRRi &R, int nbits, const M2::ARingRRi::ElementType &a, const M2::ARingRRi::ElementType &b)
aring-style adapter for arbitrary-precision real numbers, backed by MPFR.
aring-style adapter for arbitrary-precision real intervals, backed by MPFI.
References M2::ARingRRi::add(), almostEqual(), M2::ARingRRi::clear(), M2::ARingRRi::init(), M2::ARingRRi::is_equal(), M2::ARingRRi::mult(), ARingElementGenerator< RingType >::nextElement(), and ntrials.