Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Schönhage–Strassen algorithm
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Optimizations== This section explains a number of important practical optimizations, when implementing Schönhage–Strassen. === Use of other multiplications algorithm, inside algorithm === Below a certain cutoff point, it's more efficient to use other multiplication algorithms, such as [[Toom–Cook multiplication]].<ref>{{cite web |last1=Gaudry |first1=Pierrick |last2=Kruppa |first2=Alexander |last3=Zimmermann |first3=Paul |page=7|year=2007|title=A GMP-based implementation of Schönhage-Strassen's large integer multiplication algorithm |url=https://inria.hal.science/inria-00126462/file/fft.final.pdf}}</ref> === Square root of 2 trick === The idea is to use <math> \sqrt{2} </math> as a [[root of unity]] of order <math> 2^{n+2} </math> in finite field <math>\mathrm{GF}(2^{n+2} +1)</math> ( it is a solution to equation <math> \theta^{2^{n+2}} \equiv 1 \pmod {2^{n+2} + 1}</math>), when weighting values in NTT (number theoretic transformation) approach. It has been shown to save 10% in integer multiplication time.<ref>{{cite web |last1=Gaudry |first1=Pierrick |last2=Kruppa |first2=Alexander |page=6 | date=2007 | last3=Zimmermann |first3=Paul |title=A GMP-based implementation of Schönhage-Strassen's large integer multiplication algorithm |url=https://inria.hal.science/inria-00126462/file/fft.final.pdf}}</ref> === Granlund's trick === By letting <math> m = N + h </math>, one can compute <math>uv \bmod {2^N +1}</math> and <math>(u \bmod {2^h})(v \bmod 2^h)</math>. In combination with CRT (Chinese Remainder Theorem) to find exact values of multiplication {{mvar|uv}}<ref>{{cite web |last1=Gaudry |first1=Pierrick |last2=Kruppa |page=6|date=2007|first2=Alexander |last3=Zimmermann |first3=Paul |title=A GMP-based implementation of Schönhage-Strassen's large integer multiplication algorithm |url=https://inria.hal.science/inria-00126462/file/fft.final.pdf}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)