From ripley@stats.ox.ac.uk  Thu Jan 24 12:01:22 2002
From: ripley@stats.ox.ac.uk (Prof Brian Ripley)
Date: Thu, 24 Jan 2002 12:01:22 +0000 (GMT)
Subject: [Rd] round function
In-Reply-To: <Pine.LNX.4.33L2.0201241235180.7180-100000@linaria.dst.unive.it>
Message-ID: <Pine.LNX.4.31.0201241200390.3406-100000@gannet.stats>

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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] round function
Prof Brian Ripley