Skip to content
Back to formatted view

Raw Message

Message-ID: <50EE9EC9.80206@atsec.com>
Date: 2013-01-10T10:58:17Z
From: Stephan Mueller
Subject: Precision of values > 53 bits

Hi,

I am working with large numbers and identified that R looses precision
for such high numbers.

The precision is lost exactly when the number is equal or larger than 53
bits. See the following output which shows that the numbers below 53 bit
have proper precision:

> 2^53
[1] 9007199254740992
> 2^53-1
[1] 9007199254740991
> 2^53-2
[1] 9007199254740990

Now, see the numbers above 53 bit:

> 2^53
[1] 9007199254740992
> 2^53+1
[1] 9007199254740992
> 2^53+2
[1] 9007199254740994
> 2^53+3
[1] 9007199254740996
> 2^53+4
[1] 9007199254740996


Is there a solution to the problem?

Thanks a lot
Stephan