fork download
  1. library(gmp)
  2. library(Rmpfr)
  3.  
  4. F <- function(N)
  5. {
  6. a <- as.bigq(c("4", "17 / 4"))
  7. if (N > 0) for (i in 1:N) a <- c(a[2], 108 - 815 / a[2] + 1500 / prod(a))
  8. a[1]
  9. }
  10.  
  11. cat(format(mpfr(F(80), 200), 30), "\n", sep = "")
Success #stdin #stdout #stderr 0.6s 50920KB
stdin
Standard input is empty
stdout
4.99999999999999999642620179508
stderr
Attaching package: ‘gmp’

The following objects are masked from ‘package:base’:

    %*%, apply, crossprod, matrix, tcrossprod

C code of R package 'Rmpfr': GMP using 64 bits per limb


Attaching package: ‘Rmpfr’

The following objects are masked from ‘package:stats’:

    dbinom, dnorm, dpois, pnorm

The following objects are masked from ‘package:base’:

    cbind, pmax, pmin, rbind