[Rd] round() doesnt (PR#1138)

Prof Brian Ripley ripley@stats.ox.ac.uk
Mon, 5 Nov 2001 08:47:59 +0000 (GMT)


On Mon, 22 Oct 2001, David Brahm wrote:

> Hi, all,
>
>    I swear, bug.report() ate my message!  Apologies to all, esp. Peter who
> will once again have to clean up after my mess...
>
>    The bug report was supposed to say:
>
> R> round(100000/3, -2) - 33300
>    [1] -7.275958e-12
>
> I would have hoped for 0.  The problem seems to be specifically for negative
> "digits".
> 			-- David Brahm (brahm@alum.mit.edu)

Fixed for R-devel.  Now for digits <=0 a final rounding to integer is done
in fround.

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