Re: [Rd] Should 0L * NA_integer_ be 0L?

2020-05-23 Thread Michael Chirico
OK, so maybe one way to paraphrase: For R, the boundedness of integer vectors is an implementation detail, rather than a deeper mathematical fact that can be exploited for this case. One might also expect then that overflow wouldn't result in NA, but rather automatically cast up to numeric? But

Re: [Rd] Should 0L * NA_integer_ be 0L?

2020-05-23 Thread Martin Maechler
> Michael Chirico > on Sat, 23 May 2020 18:08:22 +0800 writes: > I don't see this specific case documented anywhere (I also tried to search > the r-devel archives, as well as I could); the only close reference > mentions NA & FALSE = FALSE, NA | TRUE = TRUE. And there's

[Rd] Should 0L * NA_integer_ be 0L?

2020-05-23 Thread Michael Chirico
I don't see this specific case documented anywhere (I also tried to search the r-devel archives, as well as I could); the only close reference mentions NA & FALSE = FALSE, NA | TRUE = TRUE. And there's also this snippet from R-lang: In cases where the result of the operation would be the same for