Hi,
x <- c(rep(180003L, 1000), -rep(120002L, 1500))
This is correct:
> sum(as.double(x))
[1] 0
This is not:
> sum(x)
[1] 4996000
Returning NA (with a warning) would also be acceptable for the latter.
That would make it consistent with cumsum(x):
> cumsum(x)[lengt
On 09/12/2011 1:40 PM, Hervé Pagès wrote:
Hi,
x<- c(rep(180003L, 1000), -rep(120002L, 1500))
This is correct:
> sum(as.double(x))
[1] 0
This is not:
> sum(x)
[1] 4996000
Returning NA (with a warning) would also be acceptable for the latter.
That would m
Hi Duncan,
On 11-12-09 11:39 AM, Duncan Murdoch wrote:
On 09/12/2011 1:40 PM, Hervé Pagès wrote:
Hi,
x<- c(rep(180003L, 1000), -rep(120002L, 1500))
This is correct:
> sum(as.double(x))
[1] 0
This is not:
> sum(x)
[1] 4996000
Returning NA (with a warning) would also be acce