Understanding Schönhage-Strassen algorithm (huge integer multiplication)

后端 未结 3 647
自闭症患者
自闭症患者 2021-02-08 13:56

I need to multiply several 1000s digits long integers as efficiently as possible in Python. The numbers are read from a file.

I am trying to implement the Schönhage-Stra

3条回答
  •  情话喂你
    2021-02-08 14:26

    1000 digits is "small" for Schönhage-Strassen to be really worth using. You may have a look at the Toom Cook multiplication. gmpy is a Python wrapper to gmp providing these functions.

提交回复
热议问题