You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Richard Kreckel 44e77b58d0 Fix floating-point input from decimal string. 10 years ago
..
digit Use paths relative the `src' directory in the #include directives. 16 years ago
digitseq Fix build breakage on Sparc. 16 years ago
hash Fix yet another dependent base C++ language issue. 14 years ago
input Use paths relative the `src' directory in the #include directives. 16 years ago
low Use paths relative the `src' directory in the #include directives. 16 years ago
output Use paths relative the `src' directory in the #include directives. 16 years ago
proplist Use paths relative the `src' directory in the #include directives. 16 years ago
random Use paths relative the `src' directory in the #include directives. 16 years ago
ring Use paths relative the `src' directory in the #include directives. 16 years ago
string Remove cl_null_string defintion. 15 years ago
symbol Use paths relative the `src' directory in the #include directives. 16 years ago
cl_N.h Use paths relative the `src' directory in the #include directives. 16 years ago
cl_alloca.cc Use paths relative the `src' directory in the #include directives. 16 years ago
cl_alloca.h Use paths relative the `src' directory in the #include directives. 16 years ago
cl_as_exception.cc Use paths relative the `src' directory in the #include directives. 16 years ago
cl_base_config.h.in Rework of autoconfiscation infrastructure 21 years ago
cl_condition.cc Use paths relative the `src' directory in the #include directives. 16 years ago
cl_d0_exception.cc Use paths relative the `src' directory in the #include directives. 16 years ago
cl_debug.cc Use paths relative the `src' directory in the #include directives. 16 years ago
cl_debugout.cc Use paths relative the `src' directory in the #include directives. 16 years ago
cl_free.cc Finalize CLN 1.3.3 release. 12 years ago
cl_gmpconfig.h.in Initial revision 25 years ago
cl_immclasses.cc Use paths relative the `src' directory in the #include directives. 16 years ago
cl_inline.h Fix linking problems on some platforms caused by inline/non-inline versions 17 years ago
cl_inline2.h Fix linking problems on some platforms caused by inline/non-inline versions 17 years ago
cl_iterator.h * All Files have been modified for inclusion of namespace cln; 25 years ago
cl_low.h Support for MSVC. 14 years ago
cl_macros.h Use paths relative the `src' directory in the #include directives. 16 years ago
cl_malloc.cc Use paths relative the `src' directory in the #include directives. 16 years ago
cl_maybe_inline.h don't expose configure generated headers to users. 16 years ago
cl_notreached_exception.cc Use paths relative the `src' directory in the #include directives. 16 years ago
cl_offsetof.h Avoid g++-3.1 offsetof warnings. 23 years ago
cl_sysdep.h don't expose configure generated headers to users. 16 years ago
cl_version.cc [bugfix] Actually compile in version info into the library. 16 years ago
cl_xmacros.h Initial revision 25 years ago
HTTP/1.1 200 OK Cache-Control: public,max-age=86400 Content-Length: 1521 Content-Type: text/plain; charset=utf-8 Etag: "efa7e8a0692098935027eb573758948235c40ff5" Set-Cookie: macaron_flash=; Path=/; Max-Age=0; HttpOnly; SameSite=Lax X-Frame-Options: SAMEORIGIN Date: Sat, 23 Nov 2024 08:57:06 GMT #include "test_MI.h" int test_MI_expt (int iterations) { int error = 0; int i; // Check special caSes 0, 1, 2. for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); cl_modint_ring R = find_modint_ring(m); cl_MI a = R->canonhom(testrandom_I()); ASSERT2(expt(a,0) == R->one(), m,a); ASSERT2(expt(a,1) == a, m,a); ASSERT2(expt(a,2) == a*a, m,a); } // Check special cases -1, -2. for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); cl_modint_ring R = find_modint_ring(m); cl_I ai = testrandom_I(); if (gcd(m,ai)==1) { cl_MI a = R->canonhom(ai); cl_MI ar = R->recip(a); ASSERT2(expt(a,-1) == ar, m,a); ASSERT2(expt(a,-2) == ar*ar, m,a); } } // Check homomorphism (fixed exponent). for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); if (!zerop(m)) { // avoid generating huge numbers cl_modint_ring R = find_modint_ring(m); cl_MI a = R->canonhom(testrandom_I()); cl_MI b = R->canonhom(testrandom_I()); cl_I e = abs(testrandom_I()); ASSERT4(expt(a,e)*expt(b,e) == expt(a*b,e), m,a,b,e); } } // Check distributive formulas (fixed base). for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); if (!zerop(m)) { // avoid generating huge numbers cl_modint_ring R = find_modint_ring(m); cl_MI a = R->canonhom(testrandom_I()); cl_I e = abs(testrandom_I()); cl_I f = abs(testrandom_I()); ASSERT4(expt(a,e)*expt(a,f) == expt(a,e+f), m,a,e,f); ASSERT4(expt(expt(a,e),f) == expt(a,e*f), m,a,e,f); } } return error; }