Computing the Value of Pi in the Manner of Lambda Function with R Statistical Programming Language
DOI:
https://doi.org/10.32734/jocai.v5.i1-5556Keywords:
anonim, fungsi, integral, jumlah riemann, lingkaran, luas di bawah suatu kurva, RAbstract
The value of π is one of the famous mathematical constant, not only to mathematicians, but also to physicists and to engineers. Numerous algorithm is used to compute what is the value of π, but most of programmer do not use lambda function and neglect the aesthetic of their script. This study aims to compute the value π by write it first as infinite series using Riemann sum, and then the computing of it is conducted in R programming language. We involved the role of anonymous function or known as lambda function to make the R code is more beautiful, artistic, and elegant.
Downloads
References
J. Stewart, D. K. Clegg, and S. Watson, Calculus: early transcendentals. Cengage Learning, 2020.
H. Wickham, “The tidyverse,†R Packag. ver, vol. 1, no. 1, p. 1, 2017.
O. Yavoruk, “How does the Monte Carlo method work?,†arXiv Prepr. arXiv1909.13212, 2019.
H. Bae and J. Chang, “An investigation into computing the digits of pi.â€
G. Galperin, “Playing pool with $π$ (the number $π$ from a billiard point of view),†Regul. chaotic Dyn., vol. 8, no. 4, pp. 375–394, 2003.
T. W. Körner, Vectors, pure and applied: a general introduction to linear algebra. Cambridge University Press, 2012.
W. N. Venables and D. M. Smith, “The R Core Team. An Introduction to R, Notes on R: A Programming Environment for Data Analysis and Graphics, Version 3.6. 3. 2020.†2020.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2021 Data Science: Journal of Computing and Applied Informatics

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.