[Rd] Bug in rnorm? (PR#12016)

paul.eckermann at adelaide.edu.au paul.eckermann at adelaide.edu.au
Thu Aug 7 11:33:15 CEST 2008

Full_Name: Paul Eckermann
Version: 2.7.1
OS: Windows XP Service Pack 2
Submission from: (NULL) (

This is the first time I have submitted a bug report, so apologies if I have not
followed the correct protocol.

If I enter


it returns 28 rather than 29.

z<-sapply(y,function(x) length(rnorm(x*100)))

indicates that it has something to do with multiples of 7 (rounding error?),
even though 29, 57 and 58 are the 3 values for which it returns incorrect values
of z.

I hope that this is not something obvious that I have missed. This can be
overcome by doing the x*100 calculation outside the rnorm function, but I don't
see why this needs to be done when the answer is (supposed to be) an integer.

Paul Eckermann

More information about the R-devel mailing list