search for: expr9

Displaying 3 results from an estimated 3 matches for "expr9".

Did you mean: expr
2007 May 26
1
bug from nlm function (PR#9711)
...;-formula(~log(a)-log(b)-(a-1)*(log(x)-log(b))- (x^a)/(b^a)) > fllwfuncH <-deriv(fllwform,c("a","b"),function(a,b,x){}) > fllwfuncH function (a, b, x) { .expr2 <- log(b) .expr4 <- a - 1 .expr5 <- log(x) .expr6 <- .expr5 - .expr2 .expr9 <- x^a .expr10 <- b^a .expr19 <- .expr10^2 .expr23 <- 1/b .value <- log(a) - .expr2 - .expr4 * .expr6 - .expr9/.expr10 .grad <- array(0, c(length(.value), 2), list(NULL, c("a", "b"))) .grad[, "a"] <- 1/a - .e...
2007 Mar 20
2
Problems about Derivaties
...example: Suppose that I have a function of this form: f(x,y)=x^3+y^3+(x^2)*(y^2). With "deriv3" I can evaluate the first derivative and the hessian matrix, as follows: > d<-deriv3(~x^3+y^3+(x^2)*(y^2),c("x","y")) > d[[1]] { .expr4 <- x^2 .expr5 <- y^2 .expr9 <- 2 * x .expr15 <- 2 * y .value <- x^3 + y^3 + .expr4 * .expr5 .grad <- array(0, c(length(.value), 2), list(NULL, c("x", "y"))) .hessian <- array(0, c(length(.value), 2, 2), list(NULL, c("x", "y"), c("x", "y"))) .grad[, &qu...
2007 Jan 12
1
incorrect result of deriv (PR#9449)
...0, c(length(.value), 1), list(NULL, c("z"))) .grad[, "z"] <- -(z * dnorm(z)) attr(.value, "gradient") <- .grad .value }) deriv(~exp(-z^2/(2*s^2))/s/sqrt(2*pi),"z") expression({ .expr4 <- 2 * s^2 .expr6 <- exp(-z^2/.expr4) .expr9 <- sqrt(2 * pi) .value <- .expr6/s/.expr9 .grad <- array(0, c(length(.value), 1), list(NULL, c("z"))) .grad[, "z"] <- -(.expr6 * (2 * z/.expr4)/s/.expr9) attr(.value, "gradient") <- .grad .value }) should provide the same expression...