Re: [R] Help for numbers close to 1 in R

2010-02-13 Thread Gabor Grothendieck
Check out ?expm1 On Sat, Feb 13, 2010 at 9:17 AM, cjmr wrote: > > Hi all. > > I have a problem with adding 1 and very small numbers > > ex: >>p=1e-49 >>1+p > [1] 1 > > My problem comes from some values of x for the value: >    1-exp(-sum((x-1/sqrt(3))^2)) > the return values are always equivalent

Re: [R] Help for numbers close to 1 in R

2010-02-13 Thread Liviu Andronic
On Sat, Feb 13, 2010 at 2:17 PM, cjmr wrote: >>p=1e-49 >>1+p > [1] 1 > Try this: > source("http://r-bc.googlecode.com/svn/trunk/R/bc.R";) > p <- bc(1e-49) > p [1] ".1" > 1+p [1] "1.1" You might want t

[R] Help for numbers close to 1 in R

2010-02-13 Thread cjmr
Hi all. I have a problem with adding 1 and very small numbers ex: >p=1e-49 >1+p [1] 1 My problem comes from some values of x for the value: 1-exp(-sum((x-1/sqrt(3))^2)) the return values are always equivalent. Please help Thanks -- View this message in context: http://n4.nabble.com/Help-