[R] the biggest integer R can display in complete form but not scientific form
Rob Creecy
rcreecy at census.gov
Wed Jun 6 16:23:33 CEST 2007
You could try the gmp multi precision arithmetic package.
> library(gmp)
> urand.bigz(10,64)
[1] "11691875040763095143" "15618480061048441861"
"13311871202921807091" "419603425985430936"
[5] "1009212057431928522" "7087885826104674385"
"12844267011818015745" "12455584250595618327"
[9] "13509505397081611804" "17712034795004058021"
Rob
Francisco J. Zagmutt wrote:
> Also, look at options(digits) to set the number digits to be printed in
> the console, i.e.
>
> > pi
> [1] 3.141593
>
> > options(digits=22)
> > pi
> [1] 3.141592653589793
>
>
> Regards
>
> Francisco
>
>
> Roland Rau wrote:
>
>> 李俊杰 wrote:
>>
>>> Dear R-lister,
>>>
>>> One of my friends wanted to produce random number which is 64 bits. He did
>>> it with Fortune. I think R can do it also. But I don't know how to display a
>>> very big integer in the complete form but not scientific form. And what's
>>> the biggest integer R can display in complete form ?
>>>
>>> Thanks in advance,
>>>
>>> Li Junjie
>>>
>>>
>>>
>>>
>> I guess the biggest integer R can represent (if this is what you mean)
>> is machine dependent and you can find it out via:
>>
>> .Machine
>> help(".Machine")
>>
>> I hope this helps,
>> Roland
>>
>> ______________________________________________
>> R-help at stat.math.ethz.ch 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.
>>
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>
>
>
More information about the R-help
mailing list