round function
On Thu, 24 Jan 2002, Claudio Agostinelli wrote:
Hy everybody, if I use round function with numbers bigger than 2147483648 (at least in my PC running linux) I got
round(2147483648)
[1] -2147483648
trunc, floor and ceiling work fine
trunc(2147483648)
[1] 2147483648
ceiling(2147483648)
[1] 2147483648
floor(2147483648)
[1] 2147483648
Is this a bug? If not, I suggest that round give back NA or NaN in these cases.
It's a bug in 1.4.0 only, already corrected in the patched version.
Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._