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.
Copyrights © 2026