Loading

Software Support for Arbitrary Precision Arithmetic in Programming Languages
Kannan Balasubramanian

Dr. Kannan Balasubramanian, Professor, School of Computing, SASTRA University, Thanjavur (TamilNadu), India.

Manuscript received on 01 November 2023 | Revised Manuscript received on 09 November 2023 | Manuscript Accepted on 15 November 2023 | Manuscript published on 30 November 2023 | PP: 1-6 | Volume-3 Issue-2, November 2023 | Retrieval Number: 100.1/ijcns.A1425054124 | DOI: 10.54105/ijcns.A1425.113223

Open Access | Ethics and Policies | Cite | Zenodo | Indexing and Abstracting
© The Authors. Published by Lattice Science Publication (LSP). This is an open-access article under the CC-BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/)

Abstract: Arbitrary precision arithmetic, also known as bignum arithmetic, is a computational technique that allows programmers to perform arithmetic operations on numbers with significantly higher precision and magnitude than what is typically supported by the built-in numerical data types in programming languages. This technique is especially useful when working with extremely large or extremely precise numbers, such as in cryptography or scientific computations. Arbitrary precision arithmetic has many applications in the areas of Cryptography, Numerical Computation, Statistical Analysis, and High Precision measurements. For example, the calculation of the modulus in the RSA algorithm involves numbers with 1024-bit numbers and higher. An arithmetic calculation involving Multiplication and exponentiation of such numbers using Modulo arithmetic cannot be easily carried out in the existing programming Languages unless special software is provided. We can calculate the mathematical constant Pi to many thousand decimal places using the support provided in Programming Languages. Many programming languages provide built-in support for libraries for arbitrary precision arithmetic. We discuss the support provided in C/C++, Java and Python Languages with examples. Besides Programming Languages, Toolkits like Matlab and Sagemath also are used for scientific computation and special software support provided in these toolkits can enable arbitrary precision arithmetic. Most Programming Languages have support for floating-point arithmetic. We also discuss how arbitrary precision floating point arithmetic. can be supported in C/C++, Java, and Python. In addition, we discuss support for arbitrary precision integer arithmetic in Ruby, Javascript and Matlab and support for arbitrary precision floating point arithmetic in the Perl Language. Finally, we provide an example of computing the constant Pi to many decimal places using the sagemath tool.

Keywords: Numerical Computation, RSA Algorithm, Arbitrary Precision Arithmetic, Floating-Point Arithmetic, Programming Languages, Programming Language Libraries, Pi Calculation
Scope of the Article: Cryptographic Protocols