I'm new to Boost and trying to use its multi-precision library to multiply very large inputs:
mp::uint1024_t my_1024_bit_int1 = 0b00100101101000100010010...010101;
mp::uint1024_t my_1024_bit_int2 = 0b0010101001000101000010100000001001...01010111; // bigger in practice
mp::uint1024_t my_1024_bit_result = my_1024_bit_int2*my_1024_bit_int1;
I need to be able to save the result as a string in binary form. I have tried to access the number of "limbs" in the integer:
int limbs = my_1024_bit_result.backend.limbs();
and then iterate through each limb and use the bitset
function to convert each limb to a binary string, but it did not work.
How else could I achieve this?