search for: 1e3l

Displaying 4 results from an estimated 4 matches for "1e3l".

Did you mean: 13l
2020 May 20
2
Precision of function mean,bug?
Hello R-dev, Yesterday, while I was testing the newly implemented function pmean in package kit, I noticed a mismatch in the output of the below R expressions. set.seed(123) n=1e3L idx=5 x=rnorm(n) y=rnorm(n) z=rnorm(n) a=(x[idx]+y[idx]+z[idx])/3 b=mean(c(x[idx],y[idx],z[idx])) a==b # [1] FALSE For idx= 1, 2, 3, 4 the last line is equal to TRUE. For 5, 6 and many others the difference is small but still. Is that expected or is it a bug? Thank you Best Regards Morgan Jacob...
2020 May 20
2
Precision of function mean,bug?
...<morgan.emailbox at gmail.com> wrote: > > > > Hello R-dev, > > > > Yesterday, while I was testing the newly implemented function pmean in > > package kit, I noticed a mismatch in the output of the below R expressions. > > > > set.seed(123) > > n=1e3L > > idx=5 > > x=rnorm(n) > > y=rnorm(n) > > z=rnorm(n) > > a=(x[idx]+y[idx]+z[idx])/3 > > b=mean(c(x[idx],y[idx],z[idx])) > > a==b > > # [1] FALSE > > > > For idx= 1, 2, 3, 4 the last line is equal to TRUE. For 5, 6 and many > > othe...
2020 May 20
0
Precision of function mean,bug?
...0 May 2020, at 12:40 , Morgan Morgan <morgan.emailbox at gmail.com> wrote: > > Hello R-dev, > > Yesterday, while I was testing the newly implemented function pmean in > package kit, I noticed a mismatch in the output of the below R expressions. > > set.seed(123) > n=1e3L > idx=5 > x=rnorm(n) > y=rnorm(n) > z=rnorm(n) > a=(x[idx]+y[idx]+z[idx])/3 > b=mean(c(x[idx],y[idx],z[idx])) > a==b > # [1] FALSE > > For idx= 1, 2, 3, 4 the last line is equal to TRUE. For 5, 6 and many > others the difference is small but still. > Is that exp...
2020 May 21
0
Precision of function mean,bug?
...esterday, while I was testing the newly implemented function >>> pmean in >>> > > > package kit, I noticed a mismatch in the output of the below R >>> expressions. >>> > > > >>> > > > set.seed(123) >>> > > > n=1e3L >>> > > > idx=5 >>> > > > x=rnorm(n) >>> > > > y=rnorm(n) >>> > > > z=rnorm(n) >>> > > > a=(x[idx]+y[idx]+z[idx])/3 >>> > > > b=mean(c(x[idx],y[idx],z[idx])) >>> > > > a==b...