[R] Optimization problem
Rui Barradas
ruipbarradas at sapo.pt
Thu Apr 11 12:04:06 CEST 2013
Hello,
You cannot change the numerical accuracy, it's a built-in constant. To
see it use
?.Machine
.Machine$double.eps # smallest value different from zero
Actually, .Machine$double.eps is the "the smallest positive
floating-point number x such that 1 + x != 1"
You can try the following function
is.zero <- function(x, eps = .Machine$double.eps^0.5) abs(x) < eps
is.zero(your_value) # TRUE?
Or even try ?all.equal
all.equal(your_value, 0)
Hope this helps,
Rui Barradas
Em 10-04-2013 22:13, nntx escreveu:
> Rui, thanks for your reply. You meant that it is the issue of accuracy? So if
> I change the numerical accuracy, my results can be output? Thanks a lot!
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Optimization-problem-tp4663821p4663928.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list