Displaying 6 results from an estimated 6 matches for "fprime".
Did you mean:
prime
2010 Feb 15
1
error message error
Hi r-users,
I hope somebody can help me to understand the error message. Here is my code;
## Newton iteration
newton_gam <- function(z)
{ n <- length(z)
r <- runif(n)
tol <- 1E-6
cdf <- vector(length=n, mode="numeric")
fprime <- vector(length=n, mode="numeric")
f <- vector(length=n, mode="numeric")
for (i in 1:1000)
{ cdf <- integrate(fprime, lower = 0, upper = z)$value
f <- cdf - r
# Newton method
z <- z - f/fprime
if (any(f < tol)) break
}...
2010 Jan 26
1
newton method for single nonlinear equation
...]*(1-rho)/(2*sqrt(rho)))^(alp-0.5)
bes1 <- besselI(pars[1]*sqrt(rho)/(1-rho),alp-0.5)
bes2 <- besselI(pars[1]*sqrt(rho)/(1-rho),alp-1.5)
bes3 <- besselI(pars[1]*sqrt(rho)/(1-rho),alp+0.5)
## Equation
f <- c*t1*t2*bes1 - runi
## derivative
fprime <- c*t1*t2*( -bes1/(1-rho) + (alp-0.5)*bes1/pars[1] + sqrt(rho)*(bes2-bes3)/(2*(1-rho)))
z[i+1] <- z[i] - f/fprime
}
z
}
pars <- 0.5
newton.inputsingle(pars,5)
The output :
> pars <- 0.5
> newton.inputsingle(pars,5)
[1] 0.5000000 -0....
2010 Jan 26
1
Newton method
...]*(1-rho)/(2*sqrt(rho)))^(alp-0.5)
bes1 <- besselI(pars[1]*sqrt(rho)/(1-rho),alp-0.5)
bes2 <- besselI(pars[1]*sqrt(rho)/(1-rho),alp-1.5)
bes3 <- besselI(pars[1]*sqrt(rho)/(1-rho),alp+0.5)
## Equation
f <- c*t1*t2*bes1 - runi
## derivative
fprime <- c*t1*t2*( -bes1/(1-rho) + (alp-0.5)*bes1/pars[1] + sqrt(rho)*(bes2-bes3)/(2*(1-rho)))
z[i+1] <- z[i] - f/fprime
}
z
}
pars <- 0.5
newton.inputsingle(pars,5)
The output :
> pars <- 0.5
> newton.inputsingle(pars,5)
[1] 0.5000000 -0....
2010 Feb 10
1
looping problem
Hi R-users,
I have this code here:
library(numDeriv)
fprime <- function(z)
{ alp <- 2.0165;
rho <- 0.868;
# simplified expressions
a <- alp-0.5
c1 <- sqrt(pi)/(gamma(alp)*(1-rho)^alp)
c2 <- sqrt(rho)/(1-rho)
t1 <- exp(-z/(1-rho))
t2 <- (z/(2*c2))^a
bes1 <- besselI(z*c2,a)
t1bes1 <- t1*...
2010 Feb 09
0
For and while in looping
I would like to solve a nonlinear eqn using newton method and here is the code:
library(numDeriv)
fprime <- function(z)
{ alp <- 2.0165;
rho <- 0.868;
# simplified expressions
a <- alp-0.5
c1 <- sqrt(pi)/(gamma(alp)*(1-rho)^alp)
c2 <- sqrt(rho)/(1-rho)
t1 <- exp(-z/(1-rho))
t2 <- (z/(2*c2))^a
bes1 <- besselI(z*c2,a)
t1bes1 <-...
2016 Jun 02
4
Floating Point SCEV Analysis
For reference, the case with a variable loop count is filed as PR27894:
https://llvm.org/bugs/show_bug.cgi?id=27894
And the case with a constant loop count is filed as PR27899:
https://llvm.org/bugs/show_bug.cgi?id=27899
On Thu, Jun 2, 2016 at 7:48 AM, Demikhovsky, Elena via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> I implemented IV simplification with FP SCEV and uploaded a new