[R] Integer bit size and the modulus operator

Peter Dalgaard p.dalgaard at biostat.ku.dk
Mon Jan 30 22:37:06 CET 2006


Ionut Florescu <ifloresc at stevens.edu> writes:

> Actually it does that in my 2.2.1 version as well:
> 
>  > options(digits=20)
>  > 8^(1:20)
>  [1] 8.0000000000000000e+00 6.4000000000000004e+01 5.1200000000000001e+02
>  [4] 4.0960000000000001e+03 3.2768000000000002e+04 2.6214400000000002e+05
>  [7] 2.0971519999999999e+06 1.6777215999999999e+07 1.3421772800000000e+08
> [10] 1.0737418240000001e+09 8.5899345920000005e+09 6.8719476736000003e+10
> [13] 5.4975581388799997e+11 4.3980465111039999e+12 3.5184372088832001e+13
> [16] 2.8147497671065600e+14 2.2517998136852482e+15 1.8014398509481984e+16
> [19] 1.4411518807585588e+17 1.1529215046068471e+18
> 

Hmm, then it is a platform dependency and my memory playing tricks on
me... The thing that got fixed was log2(8), perhaps?
 

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




More information about the R-help mailing list