search for: c_zeroin2

Displaying 2 results from an estimated 2 matches for "c_zeroin2".

2023 Feb 20
1
uniroot violates bounds?
...ry, but I think progress would be better with more than one contributor. For me, the following fix makes the job : --- nlm.R.old??? 2018-09-25 10:44:49.000000000 +0200 +++ nlm.R??? 2023-02-20 10:46:39.893542531 +0100 @@ -143,14 +143,14 @@ ???? if(check.conv) { ???? val <- tryCatch(.External2(C_zeroin2, function(arg) f(arg, ...), -??? ??? ??? ??? ?? lower, upper, f.lower, f.upper, +??? ??? ??? ??? ?? lower, upper, f.low., f.upp., ???? ??? ??? ??? ?? tol, as.integer(maxiter)), ???? ??? ??? warning = function(w)w) ???? if(inherits(val, "warning")) ???? ??? stop("convergence probl...
2023 Feb 18
1
uniroot violates bounds?
I wrote first cut at unirootR for Martin M and he revised and put in Rmpfr. The following extends Ben's example, but adds the unirootR with trace output. c1 <- 4469.822 c2 <- 572.3413 f <- function(x) { c1/x - c2/(1-x) }; uniroot(f, c(1e-6, 1)) uniroot(f, c(1e-6, 1)) library(Rmpfr) unirootR(f, c(1e-6, 1), extendInt="no", trace=1) This gives more detail on the iterations,