-3

In my project, I should get two numbers that are bigger than long long or etc. So I'm looking for a good solution.

Ali.v
  • 3
  • 4

1 Answers1

2

C++ itself is not able to work with variables that have more then 64 bits. You either may implement it yourself, which I would strongly discourage you, or you use something well tested.

One of the best and well known libraries provides an solution for you: boost.

The Multiprecision Library provides integer, rational and floating-point types in C++ that have more range and precision than C++'s ordinary built-in types. The big number types in Multiprecision can be used with a wide selection of basic mathematical operations, elementary transcendental functions as well as the functions in Boost.Math. The Multiprecision types can also interoperate with the built-in types in C++ using clearly defined conversion rules. This allows Boost.Multiprecision to be used for all kinds of mathematical calculations involving integer, rational and floating-point types requiring extended range and precision.

Find all the information you need behind this Boost.Multiprecision

skratchi.at
  • 1,151
  • 7
  • 22