Potrzebuję kodu, który obsłużył by jeszcze większą liczbę niż jest w stanie przechować boost/multiprecision/cpp_int. Czy jest na to jakiś sposób? Wymnożenie dwóch ogromnych liczb daje mi wynik ujemny.
#include <iostream>
#include <boost/multiprecision/cpp_int.hpp>
#include "boost/mpl/modulus.hpp"
using namespace std;
namespace mp = boost::multiprecision;
int main(int argc, char** argv) {
mp::cpp_int euler = 26194632753873340482602470600187899982402756268656161642115088222204269931601629690910523738797032987144744428087470047611436579725572063118045346350639 * 2894666295091607599607776089080441405972487981119197947170667488057939157985640323643757150025183870400839347786750350201269178064721047552528631553695706;
cout << euler;
return 0;
}
-5414206902746483450
--------------------------------
Process exited after 0.06991 seconds with return value 0
Press any key to continue . . .