forked from boostorg/integer
Remove dependency on boost/typeindex in tests.
This commit is contained in:
@ -68,7 +68,7 @@ euclidean_result_t<Z> extended_euclidean(Z m, Z n)
|
|||||||
|
|
||||||
if (swapped)
|
if (swapped)
|
||||||
{
|
{
|
||||||
return {u0, u2, u2};
|
return {u0, u2, u1};
|
||||||
}
|
}
|
||||||
return {u0, u1, u2};
|
return {u0, u1, u2};
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
*/
|
*/
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <boost/type_index.hpp>
|
|
||||||
#include <boost/multiprecision/cpp_int.hpp>
|
#include <boost/multiprecision/cpp_int.hpp>
|
||||||
#include <boost/integer/common_factor.hpp>
|
#include <boost/integer/common_factor.hpp>
|
||||||
#include <boost/integer/extended_euclidean.hpp>
|
#include <boost/integer/extended_euclidean.hpp>
|
||||||
@ -18,7 +17,6 @@ using boost::integer::gcd;
|
|||||||
template<class Z>
|
template<class Z>
|
||||||
void test_extended_euclidean()
|
void test_extended_euclidean()
|
||||||
{
|
{
|
||||||
std::cout << "Testing the extended Euclidean algorithm on type " << boost::typeindex::type_id<Z>().pretty_name() << "\n";
|
|
||||||
// Stress test:
|
// Stress test:
|
||||||
//Z max_arg = std::numeric_limits<Z>::max();
|
//Z max_arg = std::numeric_limits<Z>::max();
|
||||||
Z max_arg = 500;
|
Z max_arg = 500;
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
*/
|
*/
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <boost/type_index.hpp>
|
|
||||||
#include <boost/multiprecision/cpp_int.hpp>
|
#include <boost/multiprecision/cpp_int.hpp>
|
||||||
#include <boost/integer/common_factor.hpp>
|
#include <boost/integer/common_factor.hpp>
|
||||||
#include <boost/integer/mod_inverse.hpp>
|
#include <boost/integer/mod_inverse.hpp>
|
||||||
@ -18,7 +17,6 @@ using boost::integer::gcd;
|
|||||||
template<class Z>
|
template<class Z>
|
||||||
void test_mod_inverse()
|
void test_mod_inverse()
|
||||||
{
|
{
|
||||||
std::cout << "Testing the modular multiplicative inverse on type " << boost::typeindex::type_id<Z>().pretty_name() << "\n";
|
|
||||||
//Z max_arg = std::numeric_limits<Z>::max();
|
//Z max_arg = std::numeric_limits<Z>::max();
|
||||||
Z max_arg = 500;
|
Z max_arg = 500;
|
||||||
for (Z modulus = 2; modulus < max_arg; ++modulus)
|
for (Z modulus = 2; modulus < max_arg; ++modulus)
|
||||||
|
Reference in New Issue
Block a user