> 1 %/% 0
> 1L %/% 0L
According to ?'%/%', the results should be NA-ish:
unless y == 0 where the result is NA_integer_ or NaN (depending on the typeof() of the arguments)
I could see a rationale for Inf with reals (so you could change the doco instead), but for 1L %/% 0L only NA makes sense since Inf_integer_ doesn't exist.
The remainder versions '%%' work as expected.
The bug happens on
and also on R 2.13.2-- haven't checked 2.14.
This is a matter of convention: we will examine conventions elsewhere.
The consensus seems to be that the result is undefined. In which case there is no 'wrong answer', but NA_integer_ seems a better idea than 0.
Changed in R-devel (but not for 2.14.1).