]> www.ginac.de Git - cln.git/blob - tests/test_MI_canonhom.cc
Fix double_approx(const cl_RA& x) on 64-Bit platforms.
[cln.git] / tests / test_MI_canonhom.cc
1 #include "test_MI.h"
2
3 int test_MI_canonhom (int iterations)
4 {
5         int error = 0;
6         int i;
7         // Check canonhom followed by retract.
8         for (i = iterations; i > 0; i--) {
9                 cl_I m = testrandom_I();
10                 cl_modint_ring R = find_modint_ring(m);
11                 cl_I a = testrandom_I();
12                 ASSERT2(R->retract(R->canonhom(a)) == (m==0 ? a : mod(a,abs(m))), m,a);
13         }
14         return error;
15 }