gael.millot at curie.fr
2006-Sep-01 09:14 UTC
[Rd] round() increases or decreases (PR#9195)
Full_Name: Gael Millot Version: 2.3.1. OS: XP Submission from: (NULL) (195.220.102.23) Hello. I have a strange behavior with round() when it has to deal with 5. It sometimes rounds up, sometimes rounds down. Example : coma effect :> round(0.5,0)[1] 0> round(0.25,1)[1] 0.2> round(0.225,2)[1] 0.23 Previous number effect :> round(0.35,1)[1] 0.3> round(0.45,1)[1] 0.5 It also happens with signif() Is it normal ? Many thanks. Gael.
berwin at maths.uwa.edu.au
2006-Sep-01 09:39 UTC
[Rd] round() increases or decreases (PR#9195)
G'day Gael,>>>>> "GM" == gael millot <gael.millot at curie.fr> writes:GM> I have a strange behavior with round() when it has to deal GM> with 5. [...] It also happens with signif() GM> Is it normal ? The "Details" section in the help page of round (?round or help(round)) suggests yes. Cheers, Berwin