Using extremely large integer holding 3001 digits

前端 未结 2 784
春和景丽
春和景丽 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.

    0 讨论(0)
  • 2021-01-27 08:23

    Use an arbitrary-precision arithmetic library like GMP or Boost.Multiprecision.

    0 讨论(0)
提交回复
热议问题