On 1/8/2010 1:29 PM, Magnus Torfason wrote:
Paul Evans wrote:
How can I get R to change the default precision value? For example:
x=0.9
1-x
[1] 0
Is there a way that I can get a non-zero value using some parameter,
or some package?
many thanks.
The 'gmp' package allows calcu
Paul Evans wrote:
How can I get R to change the default precision value? For example:
x=0.9
1-x
[1] 0
Is there a way that I can get a non-zero value using some parameter, or some
package?
many thanks.
The 'gmp' package allows calculation with arbitrary precision rationals
(
FAQ 7.31
The precision of a floating point number is about 16 digits and your 'x' is
at that limit. If you reduce it, you will see a result:
> x=0.9
> 1-x
[1] 0
> print(1-x, digits=20)
[1] 0
> x=0.99
> print(1-x, digits=20)
[1] 0.00999200722162641
>
On F
On 08-Jan-10 16:56:25, Paul Evans wrote:
> Hi all,
> How can I get R to change the default precision value? For example:
>> x=0.9
>> 1-x
> [1] 0
>
> Is there a way that I can get a non-zero value using some parameter,
> or some package?
> many thanks.
The problem here is that, as
Hi all,
How can I get R to change the default precision value? For example:
> x=0.9
> 1-x
[1] 0
>
Is there a way that I can get a non-zero value using some parameter, or some
package?
many thanks.
[[alternative HTML version deleted]]
__
5 matches
Mail list logo