R package "PI" approximates pi with very high-precesion. It takes only 0.04 seconds to approximate pi with 1,000,000,000 digits.
#install.packages("devtools")
library(devtools)
install_github("xliusufe/PI")
[x] For Windows OS
If you can not install by using "install_github(xliusufe/PI)", you can clone or download the zipped file, and rebuild the unzipped raw package "PI" locally. Open cmd and type
R CMD build PI
If "Error in inDL(x,as.logical(local),as.logical(now),....): ...." comes after installed successfully, refer to the next comment
[x] For Mac OS
[x] PI-manual.pdf ------------------ Details of the usage of the package.
[x] PI.md ------------------------- The approximation of pi with 10000 digits.
[x] Web-based calculator --------- A web-based calculator
library(PI)
pi <- Pi(1000)
print(pi,quote=FALSE)
This R package is developed by Xu Liu (liu.xu@sufe.edu.cn).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.