Journal "Software Engineering"
a journal on theoretical and applied science and technology
ISSN 2220-3397

Issue N2 2017 year

DOI: 10.17587/prin.8.66-75
Synthesis of Computer Programs for Long Integers Multiplication
M. E. Kulyas, kuliasmy@mpei.ru, National Research University Moscow Power Engineering Institute, 111250, Russian Federation
Corresponding author: Kulyas Mikhail E., PhD Student, National Research University "Moscow Power Engineering Institute", 111250, Russian Federation, E-mail: kuliasmy@mpei.ru
Received on September 25, 2016
Accepted on November 11, 2016

This article provides two variants of hybrid recursive algorithms of long integers multiplication, combining the asymptotically fast Karatsuba algorithm with shift-and-add algorithm at low levels of recursion. These algorithms can find a good use when creating computer algebra system libraries. The article introduces both the recursive and the sequential (linear) implementation of the algorithms in question. The performance of the experiments made it possible to define the applicability of the algorithms depending on the operands size. The article demonstrates the impact of forward recursion stop threshold in a hybrid algorithm on the computing speed. The optimal values of this parameter are determined. The research proposes an efficient computational scheme which doesnt use additional memory for signs of intermediate computations results (SKML algorithm). The author develops the memory organization schemes supporting both the recursive and the sequential implementation of the SKML and AKML algorithms. The research evaluates the programs memory size and the data memory size needed for efficient use of the algorithms in question. The author compares the computing efficiency of the algorithms in question against the well-known GMP and Boost libraries.

Keywords: long integers multiplication, Karatsuba algorithm, sequential program, recursion, computational complexity
pp. 66–75
For citation:
Kulyas M. E. Synthesis of Computer Programs for Long Integers Multiplication, Programmnaya Ingeneria, 2017, vol. 8, no. 2, pp. 66—75.
This work was supported by the Russian Foundation for Basic Research, project № 14-01-00671-А.