
brentDekker(f, a, b, ..., maxiter = 100, tol = .Machine$double.eps^0.5)
NA
if the maximum number of iterations has been exceeded..uniroot
# Legendre polynomial of degree 5
lp5 <- c(63, 0, -70, 0, 15, 0)/8
f <- function(x) polyval(lp5, x)
brentDekker(f, 0.6, 1) # 0.9061798459 correct to 10 places
Run the code above in your browser using DataLab