Add support for integer square roots.

[SVN r85184]
This commit is contained in:
John Maddock
2013-08-01 17:50:17 +00:00
parent d885506c9f
commit af494a898b
14 changed files with 285 additions and 5 deletions

View File

@@ -190,6 +190,11 @@ struct tester
BOOST_CHECK_EQUAL(mpz_int(lcm(-c, -d)).str(), test_type(lcm(-c1, -d1)).str());
BOOST_CHECK_EQUAL(mpz_int(gcd(a, -b)).str(), test_type(gcd(a1, -b1)).str());
BOOST_CHECK_EQUAL(mpz_int(lcm(c, -d)).str(), test_type(lcm(c1, -d1)).str());
// Integer sqrt:
mpz_int r;
test_type r1;
BOOST_CHECK_EQUAL(sqrt(a, r).str(), sqrt(a1, r1).str());
BOOST_CHECK_EQUAL(r.str(), r1.str());
}
void t3()