[Rd] floor and ceiling can't handle more than 15 decimal places (PR#8590)
benphalan@gmail.com
benphalan at gmail.com
Sun Feb 12 16:05:25 CET 2006
Full_Name: Ben Phalan
Version: 2.2.1
OS: Win XP
Submission from: (NULL) (131.111.111.231)
I have noticed that floor returns the wrong number when there are more than 15
decimal places:
> floor(6.999999999999999)
[1] 6
> floor(6.9999999999999999)
[1] 7
There is a similar problem with ceiling, so this may apply to all/most rounding
functions?
> ceiling (2.000000000000001)
[1] 3
> ceiling (2.0000000000000001)
[1] 2
More information about the R-devel
mailing list