Working with extra large numbers in C++ only using standard library (without boost Multiprecision or gmp)

284 views Asked by At

I have a task to work with extra large numbers on our scientific project. Numbers are between 150 and 200 digits. How can I accomplish this only using the standard template library? I am ok on lower values using long double.

I read somewhere that I should put my numbers in

1

There are 1 answers

0
AudioBubble On

I'm assuming from your question that you need to work with the exact value of large integers.

Alas, the C++ standard library does not feature multiprecision arithmetic. (nor does the ancient standard template library)

From what little information you've given, your only reasonable option is to use an external library. It is almost certainly far more worth your effort to make that work than to try and write your own library.