this question has answer here:
- why these numbers not equal? 3 answers
in r, why false y > 2?
y <- c(1, 2, 3, 4, 5) x <- 2*y exp(log(x)) == exp(log(y)) * 2 [1] true true false false false
numeric precision. try calculating difference:
exp(log(x)) - exp(log(y)) * 2
you use like:
all.equal( exp(log(x)) , exp(log(y)) * 2 )
Comments
Post a Comment