Designing an Excel VBA function to recognize more important irrational numbers

Authors

DOI:

https://doi.org/10.14232/analecta.2022.1.62-70

Keywords:

Excel VBA, programming, function, root recognition

Abstract

Calculations typically performed on a calculator or computer show the result as a decimal fraction if it is not an integer. It would be easier to interpret the result if a value could be expressed with integers and operations, such as the root subtraction operation. This article shows how this can be done with a developed algorithm in Microsoft Excel, which recognizes the most famous irrational numbers and displays them in text form together with the character of the operation sign. For example, “5√3/2” is given for 4.330127019. It is also useful to display irrational numbers with integers because only an infinite number of decimal places in a decimal fraction could show the exact value, and that is not possible. So, the developed algorithm can display a more interpretable and accurate form of the irrational number. In addition to the results that can be written as square roots, the algorithm is capable of displaying irrational numbers that can be expressed as the number Pi, using the π character. The Excel algorithm which was implemented in Visual Basic for Applications shows all rational numbers as the quotient of two integers that are relative primes.

Downloads

Download data is not yet available.

References

J. Gy. Obádovics, Matematika. Középiskolai tanulók, főiskolai és egyetemi hallgatók, valamint műszaki és gazdasági szakemberek számára, gyakorlati alkalmazásokkal, Tizenkilencedik, bővített kiadás, Scolar Kiadó, Budapest, 2012

Gy. Hampel, Excel VBA alkalmazása egy biometriai esettanulmány példáján bemutatva, Jelenkori társadalmi és gazdasági folyamatok, 12 (4) (2017), pp. 35-40.

Gy. Hampel, Egymintás t-próba programozható kialakítása Excel VBA környezetben, Jelenkori társadalmi és gazdasági folyamatok, 13 (3-4) (2018), pp. 169-175.

I. Niven, Irrational Numbers - The Carus Mathematical Monnographs, Number 11, The Mathematical Association of America, New Jersey, 1956

R. P., Agrawal, H. Agrawal, Origin of Irrational Numbers and Their Approximations. Computation, 9 (3) (2021), pp. 1-49.

I. Georgiev, L. Kristiansen, F. Stephan, Computable irrational numbers with representations of surprising complexity, Annals of Pure and Applied Logic, 172 (2) (2021), pp. 1-30.

G. Kovalcsik, Az Excel programozása, Computerbooks, Budapest, 2005

B. L. Matteson, Microsoft Excel Visual Basic Programmer’s Guide, MicrosoftPress, Washington, 1995

M., Alexander, D. Kusleika, Excel 2019 Power Programming with VBA, Wiley & Sons, Indianapolis, Indiana, 2019

J. Walkenbach, Excel VBA Programming for Dummies, 3rd edition, John Wiley & Sons Inc., New Jersey, 2013

Downloads

Published

2022-08-05

How to Cite

Fabulya, Z. (2022). Designing an Excel VBA function to recognize more important irrational numbers. Analecta Technica Szegedinensia, 16(1), 62–70. https://doi.org/10.14232/analecta.2022.1.62-70

Issue

Section

Articles