| www.delorie.com/gnu/docs/gmp/gmp_84.html | search |
![]() Buy GNU books! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
NxN limb multiplications and squares are done using one of four algorithms, as the size N increases.
Algorithm Threshold Basecase (none) Karatsuba MUL_KARATSUBA_THRESHOLDToom-3 MUL_TOOM3_THRESHOLDFFT MUL_FFT_THRESHOLD
Similarly for squaring, with the SQR thresholds. Note though that the
FFT is only used if GMP is configured with `--enable-fft', see section 2.1 Build Options.
NxM multiplications of operands with different sizes above
MUL_KARATSUBA_THRESHOLD are currently done by splitting into MxM
pieces. The Karatsuba and Toom-3 routines then operate only on equal size
operands. This is not very efficient, and is slated for improvement in the
future.
16.1.1 Basecase Multiplication 16.1.2 Karatsuba Multiplication 16.1.3 Toom-Cook 3-Way Multiplication 16.1.4 FFT Multiplication 16.1.5 Other Multiplication
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |