了解Schönhage-Strassen的算法(巨大的整数倍)算法、巨大、整数倍、Sch

2023-09-12 21:19:15 作者:26.稚梦小仙女

我要乘数1000位长整数尽可能有效地在Python。从文件中读出的数字。

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

我想实现的Schönhage-Strassen的算法整数乘法,但我停留在理解的定义和数学的背后,特别是快速傅立叶变换。

I am trying to implement the Schönhage-Strassen algorithm for integer multiplication, but I am stuck on understanding the definition and mathematics behind it, specially the Fast Fourier Transform.

任何帮助理解这个算法,像一个实际的例子还是有些假code将是非常美联社preciated。

Any help to understand this algorithm, like a practical example or some pseudo-code would be highly appreciated.

推荐答案

Knuth的的 TAOCP 的描述它,并且还具有一些FFT伪$ C $中的c,可以被用于这个其他章节。

Chapter 4.3.3 of Knuth's TAOCP describes it and also has some FFT pseudocode in other chapters that could be used for this.