[ci skip] Use less verbose naming. Add asserts as verfication of algorithms is a negligible fraction of total runtime. Use boost::multiprecision::powm and boost::multiprecision::sqrt rather than one-offs.

This commit is contained in:
Nick Thompson
2018-02-09 17:19:26 -06:00
parent fc4d657201
commit 8c415f77b1
10 changed files with 111 additions and 149 deletions

View File

@ -17,7 +17,7 @@ using boost::integer::gcd;
template<class Z>
void test_extended_euclidean()
{
Z max_arg = 500;
Z max_arg = 1000;
for (Z m = 1; m < max_arg; ++m)
{
for (Z n = 1; n < max_arg; ++n)
@ -36,6 +36,6 @@ BOOST_AUTO_TEST_CASE(extended_euclidean_test)
{
test_extended_euclidean<int>();
test_extended_euclidean<long>();
test_extended_euclidean<size_t>();
test_extended_euclidean<long long>();
test_extended_euclidean<int128_t>();
}