A
A
Alexander2015-11-23 03:26:59
C++ / C#
Alexander, 2015-11-23 03:26:59

C++ (MinGW) How to solve problem with too big integer?

Hello. In order not to overload too much: I deal with simple RSA and played around with keyless decryption. In general, for a simple example with exponentiation already issue number: 80489967537846372629453297464647461487570571919873235471102321921984841465599982406234587471131313752434026842190466496888662334711842919834043824469411198013600229146154562791676217621730254075007345029660297146908908466965611437999406658217222776330678504099080937405484368280221655073365041331503261471178528929235818166086499630222722639112420284284121.
Swipe see. usigned long long int naturally cannot cope with this and there is nowhere to shove it with an integer. long double is not suitable for division with a remainder.
Question: can someone tell me what to do with this exactly in C ++ (without much fuss with cycles)?
Well, for example: how to create a large enough integer type on MINGW32 to solve this problem?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Taratin, 2015-11-23
@Psy_Duck

https://gmplib.org/

A
anikavoi, 2015-12-09
@anikavoi

boost::multiprecision;

D
Daniil Demidko, 2015-12-15
@Daniro_San

Store it in std::string, obviously

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question