Definition at line 136 of file ARingCCCTest.cpp.
137{
141 C.init(a);
142 C.init(b);
143 C.init(c);
144 C.init(e);
145 for (
int i = 0; i <
ntrials; i++)
146 {
147
148 gen.nextElement(a);
149 gen.nextElement(b);
150 C.subtract(c, a, b);
151 C.add(e, c, b);
153 C.mult(e, a, b);
154 C.subtract_multiple(e, a, b);
155 EXPECT_TRUE(C.is_zero(e));
156 }
157 C.clear(e);
158 C.clear(c);
159 C.clear(b);
160 C.clear(a);
161}
bool almostEqual(const M2::ARingCCC &C, int nbits, const M2::ARingCCC::ElementType &a, const M2::ARingCCC::ElementType &b)
aring-style adapter for arbitrary-precision complex numbers, stored as (MPFR, MPFR) pairs.
References M2::ARingCCC::add(), almostEqual(), M2::ARingCCC::clear(), M2::ARingCCC::init(), M2::ARingCCC::is_zero(), M2::ARingCCC::mult(), ARingElementGenerator< RingType >::nextElement(), ntrials, M2::ARingCCC::subtract(), subtract(), and M2::ARingCCC::subtract_multiple().