Skip to content
Prev 21763 / 63424 Next

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 :
[1] 0
[1] 0.2
[1] 0.23

Previous number effect :
[1] 0.3
[1] 0.5

It also happens with signif()

Is it normal ?
Many thanks.

Gael.