[R] Increasing precision of rgenoud solutions

Paul Smith phhs80 at gmail.com
Wed May 9 12:11:49 CEST 2007

Dear All

I am using rgenoud to solve the following maximization problem:

myfunc <- function(x) {
  x1 <- x[1]
  x2 <- x[2]
  if (x1^2+x2^2 > 1)
  else x1+x2

genoud(myfunc, nvars=2,

How can one increase the precision of the solution

[1] 0.7072442 0.7069694


I have tried solution.tolerance but without a significant improvement.

Any ideas?

Thanks in advance,


More information about the R-help mailing list