Supports multiplication, division, and remainder for uint256.
1 2 3 4 5 6 7 8 9 |
uint256 ui1(12345678); uint256 ui2("0x00002046b1c7938971a6089c7105fc15907b8f27ac8dfea"); uint256 r = ui2 * ui1; ::fprintf(stdout, "uint256 mul 0x%s\n", r.ToString().c_str()); uint256 r = ui2 / ui1; ::fprintf(stdout, "uint256 div 0x%s\n", u1.ToString().c_str()); uint256 r = ui2 % ui1; ::fprintf(stdout, "uint256 rem 0x%s\n", u1.ToString().c_str()); |