Others explained why it happens, but you might want to look at the
zapsmall function for one way to deal with it.
On Thu, Mar 1, 2012 at 2:49 PM, Mark A. Albins wrote:
> Hi!
>
> I'm running R version 2.13.0 (2011-04-13)
> Platform: i386-pc-mingw32/i386 (32-bit)
>
> When i type in the command:
>
>
On Thu, Mar 01, 2012 at 04:55:55PM -0500, Sarah Goslee wrote:
> Of course there's rounding error: your computer can't
> store those decimal numbers precisely. See R FAQ 7.31 for
> details.
>
> See also:
> sum(10*c(-0.2, 0.8, 0.8, -3.2, 1.8)) / 10
Hi.
This is 0. This works without rounding for on
On Thu, Mar 01, 2012 at 01:49:44PM -0800, Mark A. Albins wrote:
> Hi!
>
> I'm running R version 2.13.0 (2011-04-13)
> Platform: i386-pc-mingw32/i386 (32-bit)
>
> When i type in the command:
>
> sum(c(-0.2, 0.8, 0.8, -3.2, 1.8))
>
> R returns the value:
>
> -5.551115e-17
>
> Why doesn't R retu
In base ten, using any fixed number of digits, compute
1/3 + 1/3 + 1/3
(doing the divisions before the additions).
Why isn't it 1?
1/5 has the same sort of problem in base two.
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: r-help-boun...@r-projec
Of course there's rounding error: your computer can't
store those decimal numbers precisely. See R FAQ 7.31 for
details.
See also:
sum(10*c(-0.2, 0.8, 0.8, -3.2, 1.8)) / 10
Sarah
On Thu, Mar 1, 2012 at 4:49 PM, Mark A. Albins wrote:
> Hi!
>
> I'm running R version 2.13.0 (2011-04-13)
> Platform
5 matches
Mail list logo