powered by
romberg(f, a, b, tol = .Machine$double.eps^(2/3), ...)
gauss_kronrod
romberg(sin, 0, pi) # 2.000000000000001 , rel.error: 6.6e-13 romberg(exp, 0, 1) # 1.718281828459044 , rel.error: 3.6e-13 # 1.718281828459045 , i.e. exp(1) - 1
Run the code above in your browser using DataLab