Software Support for Arbitrary Precision Arithmetic in Programming Languages

Dr. Kannan Balasubramanian
{"title":"Software Support for Arbitrary Precision Arithmetic in Programming Languages","authors":"Dr. Kannan Balasubramanian","doi":"10.54105/ijcns.a1425.113223","DOIUrl":null,"url":null,"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.","PeriodicalId":231271,"journal":{"name":"Indian Journal of Cryptography and Network Security","volume":"10 2","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2023-11-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Indian Journal of Cryptography and Network Security","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.54105/ijcns.a1425.113223","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 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.
为编程语言中的任意精度算术提供软件支持
任意精度算术,又称双精度算术,是一种计算技术,允许程序员对精度和量级明显高于编程语言内置数字数据类型通常支持的数字进行算术运算。这种技术在处理超大或超精确数字时特别有用,例如在密码学或科学计算中。任意精度算术在密码学、数值计算、统计分析和高精度测量领域有很多应用。例如,RSA 算法中的模数计算涉及 1024 位及以上的数字。使用模数运算法对这些数字进行乘法和指数运算,除非提供特殊软件,否则现有编程语言无法轻松完成。利用编程语言提供的支持,我们可以将数学常数 Pi 计算到小数点后数千位。许多编程语言都为任意精度算术库提供内置支持。我们将结合实例讨论 C/C++、Java 和 Python 语言提供的支持。除编程语言外,Matlab 和 Sagemath 等工具包也用于科学计算,这些工具包提供的特殊软件支持可实现任意精度运算。大多数编程语言都支持浮点运算。我们还将讨论如何在 C/C++、Java 和 Python 中支持任意精度浮点运算。此外,我们还讨论了 Ruby、Javascript 和 Matlab 对任意精度整数运算的支持,以及 Perl 语言对任意精度浮点运算的支持。最后,我们提供了一个使用 sagemath 工具计算 Pi 常数到小数点后多位的示例。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信