From simon.urbanek at r-project.org  Fri Feb 12 19:06:26 2010
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Fri, 12 Feb 2010 13:06:26 -0500
Subject: [Rd] long integer in R?
In-Reply-To: <48413fa11002120933r727063bble99768b6812eb561@mail.gmail.com>
References: <48413fa11002120933r727063bble99768b6812eb561@mail.gmail.com>
Message-ID: <95D578C9-8A7F-41A0-9313-7F58DD7A60AD@r-project.org>


On Feb 12, 2010, at 12:33 , blue sky wrote:

> R-exts.pdf dosen't list many types that are supported in C++, for  
> example, long. Are there storage.mode corresponds to those extra  
> types?
>

There are none - that's why they are not listed. As for long: on 32- 
bit platforms (and Win64) int and long are equivalent so you can  
simply use INTSXP. On 64-bit unix platforms (LP64) there is no way to  
losslessly use it (other than raw) but in most applications you can  
simply use REALSXP as it gives you at least 52-bits of precision which  
its sufficient for most applications.

Cheers,
Simon



[Rd] long integer in R?
Simon Urbanek