[Rprotobuf-commits] r760 - papers/jss

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jan 13 00:11:04 CET 2014


Author: jeroenooms
Date: 2014-01-13 00:11:03 +0100 (Mon, 13 Jan 2014)
New Revision: 760

Modified:
   papers/jss/article.Rnw
Log:
some rephrasing on int64

Modified: papers/jss/article.Rnw
===================================================================
--- papers/jss/article.Rnw	2014-01-12 22:46:25 UTC (rev 759)
+++ papers/jss/article.Rnw	2014-01-12 23:11:03 UTC (rev 760)
@@ -1076,18 +1076,20 @@
 \subsection{64-bit integers}
 \label{sec:int64}
 
-R does not have native 64-bit integer support.  Instead, R treats
-large integers as doubles which have limited precision.  For example,
-it loses the ability to distinguish some distinct integers:
+R also does not support the native 64-bit integer type. Numeric vectors
+with values $\geq 2^{31}$ can only be stored as doubles, which have
+limited precision. Thereby R loses the ability to distinguish some
+distinct integers:
 
 <<>>=
 2^53 == (2^53 + 1)
 @
 
-Protocol Buffers are frequently used to pass data between different
-systems, however, and most other modern systems do have support for
-64-bit integers.  To work around this, RProtoBuf allows users to get
-and set 64-bit integer types by treating them as characters.
+However, most modern languages do have support for 64-bit integers, 
+which becomes problematic when \pkg{RProtoBuf} is used to exchange data 
+with a system that requires this integer type. To work around this, 
+RProtoBuf allows users to get and set 64-bit integer values by specifying 
+them as character strings.
 
 <<echo=FALSE,print=FALSE>>=
 if (!exists("protobuf_unittest.TestAllTypes",
@@ -1108,9 +1110,9 @@
 length(unique(test$repeated_int64))
 @
 
-However, we can specify the values as character strings so that the
-C++ library on which RProtoBuf is based can store a true 64-bit
-integer representation of the data.
+But when the values are specified as character strings, RProtoBuf
+will automatically coerse them into a true 64-bit integer types 
+before storing them in the Protocol Buffer message:
 
 <<>>=
 test$repeated_int64 <- c("9007199254740992", "9007199254740993")



More information about the Rprotobuf-commits mailing list