search for: mod_iterate1

Displaying 3 results from an estimated 3 matches for "mod_iterate1".

2018 Sep 24
3
Fwd: Bug report: cbind with numeric and raw gives incorrect result
Hi there, using cbind with a numeric and raw argument produces an incorrect result. I've posted some details below, kind regards, Mike. e.g. > cbind(0, as.raw(0)) [,1] [,2] [1,] 0 6.950136e-310 A longer example shows that the result is not a rounding error, is not consistent, and repeated applications get different results. > cbind(0, as.raw(1:10))
2018 Sep 25
1
Fwd: Bug report: cbind with numeric and raw gives incorrect result
...longer observed the odd > behavior reported by mikefc. > > Index: src/main/bind.c > =================================================================== > --- src/main/bind.c (revision 75340) > +++ src/main/bind.c (working copy) > @@ -1381,11 +1381,16 @@ > MOD_ITERATE1(idx, k, i, i1, { > LOGICAL(result)[n++] = RAW(u)[i1] ? TRUE : FALSE; > }); > - } else { > + } else if (mode == INTSXP) { > R_xlen_t i, i1; > MOD_ITERATE1(idx, k, i, i1, { > INTEGER(re...
2018 Sep 25
0
Fwd: Bug report: cbind with numeric and raw gives incorrect result
...ast build R with this patch and then no longer observed the odd behavior reported by mikefc. Index: src/main/bind.c =================================================================== --- src/main/bind.c?? ?(revision 75340) +++ src/main/bind.c?? ?(working copy) @@ -1381,11 +1381,16 @@ ??? ??? ??? ?MOD_ITERATE1(idx, k, i, i1, { ??? ??? ??? ???? LOGICAL(result)[n++] = RAW(u)[i1] ? TRUE : FALSE; ??? ??? ??? ?}); -?? ??? ???? } else { +?? ??? ???? } else if (mode == INTSXP) { ??? ??? ??? ?R_xlen_t i, i1; ??? ??? ??? ?MOD_ITERATE1(idx, k, i, i1, { ??? ??? ??? ???? INTEGER(result)[n++] = (unsigned char) RAW(u)...