[R] long integer handling
jrg @end|ng |rom |oe@|@u@
Sat Nov 14 02:54:33 CET 2020
The largest consecutive integer that can be represented in double
precision is 2^53.
You'll have to move past double precision.
On 2020-11-13 20:44, Yousri Fanous wrote:
> I want to calculate 2^64-1 which is
> I set the following options to prevent scientific notation
> options("scipen"=100, "digits"=4)
>> x<-2^64 -1
>  18446744073709551616
> This is not correct. There seem to be still some approximation happening.
> How can I get the correct result?
> IBM Canada ltd
> Software developer
> [[alternative HTML version deleted]]
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help