Created
September 13, 2015 16:01
-
-
Save chfast/9136896f1ee1d214b7a6 to your computer and use it in GitHub Desktop.
boost multiprecision div bug test case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <boost/multiprecision/cpp_int.hpp> | |
#include <boost/version.hpp> | |
using u256 = boost::multiprecision::number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>>; | |
int main() | |
{ | |
std::cout << "Boost " << BOOST_VERSION << std::endl; | |
u256 a{"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBA"}; | |
u256 b{"0x1DAE6076B981DAE6076B981DAE6076B981DAE6076B981DAE6076B981DAE6077"}; | |
auto c = a / b; | |
std::cout << c << std::endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment