1
#include <iostream>
#include <limits>
int main(void) {
    cout << std::numeric_limits<uint64_t>::max();
    return 0;    
}

The code above outputs (on my machine) 18446744073709551615, but I'm trying to multiply numbers that have at least 25 digits. How to properly handle a multiplication of 2 integers that are larger than uint64?

BartoszKP
  • 32,105
  • 13
  • 92
  • 123
vaultah
  • 36,713
  • 12
  • 105
  • 132

1 Answers1

3

You need to use a library that handles big numbers. Here are some of them:

Ferruccio
  • 93,779
  • 37
  • 217
  • 294
bolov
  • 58,757
  • 13
  • 108
  • 182