On Mar 3, 2011, at 8:23 PM, Folkes, Michael wrote:

Perhaps somebody could clarify for me if the following is a floating
point matter or otherwise, and how am I to correct for it?

floor(100*.1)
[1] 10

100*(1.0-.9)
[1] 10

floor(100*(1-0.9))
[1] 9



Yes. It's a "floating point matter". What do you mean by "correct for it"? What result would be "correct"?


David Winsemius, MD
Heritage Laboratories
West Hartford, CT

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to