Generating Big Numbers for Testing Multi-Digit Arithmetic Algorithms
Autor: | Valerii Zadiraka, Andrii Tereshchenko |
---|---|
Rok vydání: | 2021 |
Předmět: | |
Zdroj: | Кібернетика та комп'ютерні технології, Iss 2, Pp 39-56 (2021) |
ISSN: | 2707-451X 2707-4501 |
DOI: | 10.34229/2707-451x.21.2.4 |
Popis: | Introduction. The emergence of new parallel computational systems, such as multi-core processors, clusters, distributed systems, is due to the solution of various applied problems in various fields. The difference between devices for which parallel algorithms are implemented causes a variety of existing methods for parallelizing the calculation of multi-digit arithmetic operations. There is a problem of developing universal algorithms for implementing multi-digit arithmetic operations that are efficiently performed on various devices and on various systems. Very often it is not possible to develop a new algorithm, since at this stage there is still no test data with which it is possible to analyze the result of calculation. Therefore, the task of preparing test data and results is no less important than the development of the algorithm itself. The quality of the prepared data determines the quality of the implemented algorithm and the time required to find and eliminate errors in the algorithm-program and its implementation. In this paper, some simple dependencies are given, using which you can visually check the correctness of the calculation of multi-digit operations of addition, subtraction, multiplication, multiplication by modulo and exponentiation by modulo. Simple algorithms for generating input and output multi-digit data are presented. Using dependencies allows to check the integrity of the output when delegating computations to distributed systems such as cloud computing. The purpose of the article is to show simple dependencies between the input data and the results of performing multi-digit operations of addition, subtraction, multiplication, multiplication by modulo and exponentiation by modulo. For the given dependencies, methods for generating input and output multi-digit numbers are shown, which can be used to check the correctness of the calculation of multi-digit operations, which significantly saves the time required for preparing test data. Dependencies are provided in a generic way, which allows you to generate input data and results for devices that operate on words of different lengths (8, 16, 32, 64, 128, 256, etc. bits). Results. The dependences between the input data and the results of performing multi-digit operations are analyzed. The provided dependencies are proved in the form of lemmas. The dependencies are presented in a general form, since to generate multi-digit sequences, it is needed to set two parameters: N – the number of digits in the multi-digit value and n – the length of the digits in bits. The examples show the generation of input data and results for various multi-digit operations. Conclusions. The paper presents dependencies that are easy to remember and use for visual verification of the results of multi-digit calculations without using additional or special software or hardware, which allows to devote the saved time to developing new or more efficient modifications of multi-digit algorithms. Keywords: multi-digit arithmetic, parallel computational model. |
Databáze: | OpenAIRE |
Externí odkaz: |