Using extremely large integer holding 3001 digits

前端 未结 2 783
春和景丽
春和景丽 2021-01-27 07:50

For example, how can I use the result of 1000^1000 for arithmetic? I don\'t think there\'s a library that can accommodate that, all I see at most is 100 number digits.

2条回答
  •  盖世英雄少女心
    2021-01-27 08:22

    What you are looking for is a library like GMP or Boost-Multiprecision or TTmath.

    Or, you might challenge yourself to write a low level representation that handles longer than standard bit representations, and do arithmetic with it.

    Stick with the first option though, if it does the job you have in mind.

提交回复
热议问题