From jkbreaux at san.rr.com  Sat May 22 06:34:14 2004
From: jkbreaux at san.rr.com (jkbreaux@san.rr.com)
Date: Sat May 22 06:34:19 2004
Subject: [Rd] Inaccurate and Inconsistent results from 'round' function
	(PR#6905)
Message-ID: <20040522043414.69F081058F@slim.kubism.ku.dk>

Full_Name: Jim Breaux
Version: 1.9.0
OS: WinXP
Submission from: (NULL) (209.78.110.135)


According to the help for 'round' it is supposed to round to the even digit. 
However, see the following examples:

In the following, R is rounding down:
> round(0.3645, 3)
[1] 0.364
> round(0.3655, 3)
[1] 0.365
> round(0.3665, 3)
[1] 0.366
> round(0.3675, 3)
[1] 0.367
> round(0.3685, 3)
[1] 0.368
> round(0.3695, 3)
[1] 0.369

However, in the examples below, R sometimes rounds to the even digit and
sometimes to the odd digit:
> round(40.3695, 3)
[1] 40.37
> round(40.3685, 3)
[1] 40.368
> round(40.3675, 3)
[1] 40.367
> round(40.3665, 3)
[1] 40.367
> round(40.3655, 3)
[1] 40.365


[Rd] Inaccurate and Inconsistent results from 'round' function (PR#6905)
jkbreaux@san.rr.com