search for: long_int

Displaying 2 results from an estimated 2 matches for "long_int".

Did you mean: log_int
2018 Jan 30
2
sum() returns NA on a long *logical* vector when nb of TRUE values exceeds 2^31
Hi Martin, Henrik, Thanks for the follow up. @Martin: I vote for 2) without *any* hesitation :-) (and uniformity could be restored at some point in the future by having prod(), rowSums(), colSums(), and others align with the behavior of length() and sum()) Cheers, H. On 01/27/2018 03:06 AM, Martin Maechler wrote: >>>>>> Henrik Bengtsson <henrik.bengtsson at gmail.com>
2018 Feb 01
0
sum() returns NA on a long *logical* vector when nb of TRUE values exceeds 2^31
...hy. For the moment. They may look arbitrary, but are not at all: If you multiply them (which looks correct, if we check the sum 's' only every 1000-th time ...((still not sure they *are* correct))) you get 9*10^18 which is only slightly smaller than 2^63 - 1 which may be the maximal "LONG_INT" integer we have. So, in the end, at least for now, we do not quite go all they way but overflow a bit earlier,... but do potentially gain a bit of speed, notably with the ITERATE_BY_REGION(..) macros (which I did not show above). Will hopefully become available in R-devel real soon now. Ma...