Skip to content
Back to formatted view

Raw Message

Message-ID: <OF9FC8FB5B.3DA92632-ONC125759F.002A75C1-C125759F.002AE5D0@precheza.cz>
Date: 2009-04-21T07:48:40Z
From: PIKAL Petr
Subject: bug when subtracting decimals?
In-Reply-To: <loom.20090420T165938-432@post.gmane.org>

Hi

r-help-bounces at r-project.org napsal dne 20.04.2009 19:01:46:

> wolfgang.siewert <wolfgang.siewert <at> gmail.com> writes:
> 
> > There is a way around: 
> > round(0.7-0.3,1)==0.4
> > (TRUE)
> > 
> > Obviously there is a problem with some combinations of decimal 
subtractions,
> > that - we have the feeling - shouldt be solved.
> 
> Oh no, not that one again! This was lecture two in my first computer
> course in 1968, but it seems to be gone the way of the dodo since than.

Maybe that is because of Excel is so widespread now and gives expected 
results (it probably silently rounds all decimal numbers before 
calculation). 
Regards
Petr

> 
> Dietr
> 
> ______________________________________________
> R-help at 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.