SYMBOLIC COMPUTATION APPROACH TO REDUCE ROUNDING ERRORS IN NUMERICAL OPERATIONS USING RYACAS
Abstract
Computational operations on computers produce only approximations due to the limitations of numerical representation, finite precision arithmetic, and hardware constraints. For simple calculations, these errors are usually negligible. However, in a sequence of numerical computations, they can propagate and accumulate, leading to significant inaccuracies and becoming a critical issue, where small errors can have substantial consequences. R, like other programming languages designed for numerical computations, is not immune to precision errors. One approach to this issue is to preserve exact values throughout calculations. In R, there are several packages, such as Ryacas and Ryacas0 enable symbolic computation, which allow true values to be maintained during operations. In this paper, we propose an application of computational techniques that effectively eliminates precision errors arising from numerical calculations. We developed a user-defined function for solving linear systems using Gauss-Jordan row elementary operations. We first developed a function to solve linear systems without using the Ryacas package, named OBE.R, and another function with the same purpose but now using Ryacas, named yac-OBE.R. These two functions are compared, and as expected, the latter eliminates numerical precision errors; hence, the accuracy is one hundred percent improved. Additionally, this study is limited to solving linear systems with a unique solution and does not discuss cases with multiple solutions or no solution. Also, symbolic computation as implemented via Ryacas typically requires more processing time.
Downloads
References
H. Liu, S. Ling, L. Wang, Z. Yu, and X. Wang, “AN OPTIMIZED ALGORITHM AND THE VERIFICATION METHODS FOR IMPROVING THE VOLUMETRIC ERROR MODELING ACCURACY OF PRECISION MACHINE TOOLS,” The International Journal of Advanced Manufacturing Technology, vol. 112, no. 11–12, pp. 3001–3015, Feb. 2021. doi: https://doi.org/10.1007/s00170-020-06266-x.
J. M. Chambers, “OBJECT-ORIENTED PROGRAMMING, FUNCTIONAL PROGRAMMING AND R,” Statistical Science, vol. 29, no. 2, pp. 167–180, 2014. doi: https://doi.org/10.1214/13-STS452.
A. Z. Pinkus and S. Winitzki, “Yacas: A Do-It-Yourself Symbolic Algebra Environment.”
V. E. Dimiceli, A. S. I. D. Lang, and L. Locke, “TEACHING CALCULUS WITH WOLFRAM|ALPHA,” Int J Math Educ Sci Technol, vol. 41, no. 8, pp. 1061–1071, Dec. 2010. doi: https://doi.org/10.1080/0020739X.2010.493241.
E. Harahap, “PEMBELAJARAN ARITMATIKA MENGGUNAKAN APLIKASI WOLFRAM ALPHA (ARITHMETIC LEARNING USING WOLFRAM ALPHA APPLICATION).” [Online]. Available: https://journals.unisba.ac.id/index.php/Matematika
P. Burns, THE R INFERNO, Second Edition. Lulu.com, 2012.
F. de Dinechin, L. Forget, J.-M. Muller, and Y. Uguen, “POSITS,” in Proceedings of the Conference for Next Generation Arithmetic 2019, New York, NY, USA: ACM, Mar. 2019, pp. 1–10. doi: https://doi.org/10.1145/3316279.3316285.
H. Hernandez, “Rounding Error Propagation: Bias and Uncertainty,” vol. 9, pp. 2024–2026. doi: https://doi.org/10.13140/RG.2.2.23005.59363.
S. F. McCormick and R. Tamstorf, “ROUNDING-ERROR ANALYSIS OF MULTIGRID ({V})-CYCLES,” SIAM Journal on Scientific Computing, vol. 46, no. 5, pp. S88–S95, Oct. 2024, doi: https://doi.org/10.1137/23M1582898.
M. Marthaulina Lestari Siahaan, A. Rosa Da Lima Leli, K. Kefamenanu, and N. Tenggara Timur, “A STUDY OF LEARNING OBSTACLES: DETERMINING SOLUTIONS OF A SYSTEM OF LINEAR EQUATIONS USING GAUSS-JORDAN METHOD,” Mosharafa: Jurnal Pendidikan Matematika, vol. 12, no. 1, 2023, [Online]. Available: http://journal.institutpendidikan.ac.id/index.php/mosharafa. doi: https://doi.org/10.31980/mosharafa.v12i1.1921
I. G. A. A. Yudistira and R. Nariswari, “OPERASI DASAR BARIS/KOLOM MATRIKS SECARA INTERAKTIF DENGAN MENGGUNAKAN R,” Engineering, MAthematics and Computer Science (EMACS) Journal, vol. 5, no. 1, pp. 25–32, Jan. 2023. doi: https://doi.org/10.21512/emacsjournal.v5i1.9206.
S. Feng, Y. Feng, C. Yu, Y. Zhang, and H. X. Liu, “TESTING SCENARIO LIBRARY GENERATION FOR CONNECTED AND AUTOMATED VEHICLES, PART I: METHODOLOGY,” IEEE Transactions on Intelligent Transportation Systems, vol. 22, no. 3, pp. 1573–1582, Mar. 2021. doi: https://doi.org/10.1109/TITS.2020.2972211.
H. Edison, X. Wang, and K. Conboy, “COMPARING METHODS FOR LARGE-SCALE AGILE SOFTWARE DEVELOPMENT: A SYSTEMATIC LITERATURE REVIEW,” IEEE Transactions on Software Engineering, vol. 48, no. 8, pp. 2709–2731, Aug. 2022. doi: https://doi.org/10.1109/TSE.2021.3069039.
B. K. Das, D. N. Jha, S. K. Sahu, A. K. Yadav, R. K. Raman, and M. Kartikeyan, “INTRODUCTION TO R SOFTWARE,” in Concept Building in Fisheries Data Analysis, Singapore: Springer Nature Singapore, 2023, pp. 209–233. doi: https://doi.org/10.1007/978-981-19-4411-6_12.
M. M. Andersen and S. Højsgaard, “COMPUTER ALGEBRA IN R BRIDGES A GAP BETWEEN SYMBOLIC MATHEMATICS AND DATA IN THE TEACHING OF STATISTICS AND DATA SCIENCE.” [Online]. Available: https://github.com/r-
N. Kshetri, M. M. Rahman, O. F. Osama, and J. Hutson, “ALGOTRIC: SYMMETRIC AND ASYMMETRIC ENCRYPTION ALGORITHMS FOR CRYPTOGRAPHY-A COMPARATIVE ANALYSIS IN AI ERA.” Int. J. Adv. Comput. Sci. Appl. (IJACSA), vol. 15, no. 12, 2024
S. A. Eisa and S. Pokhrel, “ANALYZING AND MIMICKING THE OPTIMIZED FLIGHT PHYSICS OF SOARING BIRDS: A DIFFERENTIAL GEOMETRIC CONTROL AND EXTREMUM SEEKING SYSTEM APPROACH WITH REAL TIME IMPLEMENTATION,” SIAM J Appl Math, vol. 84, no. 3, pp. S82–S104, Jun. 2024. doi: https://doi.org/10.1137/22M1505566.
M. Cui, J. Xu, Y. Zhou, H. Yang, L. Ji, and B. Zhou, “PESA: ERROR SENSITIVITY ANALYSIS TOOL FOR FLOATING-POINT COMPUTATIONAL PROGRAMS,” J Supercomput, vol. 81, no. 3, p. 477, Feb. 2025. doi: https://doi.org/10.1007/s11227-025-06962-z.
M. M. Andersen and S. Højsgaard, “COMPUTER ALGEBRA IN R WITH CARACAS,” Apr. 2021, [Online]. Available: http://arxiv.org/abs/2104.05292. doi: https://doi.org/10.32614/CRAN.package.caracas
Victor A. Bloomfield, USING R FOR NUMERICAL ANALYSIS IN SCIENCE AND ENGINEERING, 1st Edition. New York: Chapman and Hall/CRC, 2018.
M. Andersen and S. Højsgaard, “RYACAS: A COMPUTER ALGEBRA SYSTEM IN R,” J Open Source Softw, vol. 4, no. 42, p. 1763, Oct. 2019. doi: https://doi.org/10.21105/joss.01763.
J. Divasón and J. Aransay, “GAUSS-JORDAN ALGORITHM AND ITS APPLICATIONS,” 2016.
A. T. Chantada, P. Protopapas, L. G. Bachar, S. J. Landau, and C. G. Scóccola, “EXACT AND APPROXIMATE ERROR BOUNDS FOR PHYSICS-INFORMED NEURAL NETWORKS,” arXiv preprint arXiv:2411.13848, Nov. 2024.
I Putu Alit Sudrastawa, “CONCEPTUAL AND PRACTICAL REVIEW OF GAUSSIAN ELIMINATION AND GAUSS-JORDAN REDUCTION,” JURNAL ILMU KOMPUTER INDONESIA, vol. 7, no. 2, pp. 19–25, Nov. 2022.
H. Anton, ELEMENTARY LINEAR ALGEBRA. John Wiley & Sons, Limited, 2018. [Online]. Available: https://books.google.co.id/books?id=ypROEAAAQBAJ
S. Pal, K. Suresh, K. Suneetha, and M. B. Prabhakar, LINEAR ALGEBRA, 1st ed. Coimbatore, India: RK Publications, 2025.
Copyright (c) 2025 I Gusti Agung Anom Yudistira, Kie Van Ivanky Saputra

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this Journal agree to the following terms:
- Author retain copyright and grant the journal right of first publication with the work simultaneously licensed under a creative commons attribution license that allow others to share the work within an acknowledgement of the work’s authorship and initial publication of this journal.
- Authors are able to enter into separate, additional contractual arrangement for the non-exclusive distribution of the journal’s published version of the work (e.g. acknowledgement of its initial publication in this journal).
- Authors are permitted and encouraged to post their work online (e.g. in institutional repositories or on their websites) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published works.




1.gif)


