Working with large numbers in PHP

前端 未结 8 838
一个人的身影
一个人的身影 2020-11-22 11:22

To use modular exponentiation as you would require when using the Fermat Primality Test with large numbers (100,000+), it calls for some very large calculations.

Whe

8条回答
  •  南笙
    南笙 (楼主)
    2020-11-22 11:54

    I suggest you try BigInteger. If that doesn't work out, you may use SWIG to add C/C++ code for the big integer calculations and link it into your code.

提交回复
热议问题