Closed mb706 closed 1 week ago
This apparently happens because the minimal integer value represents NA in R: https://stackoverflow.com/questions/56507748/internal-representation-of-int-na
(credit to @sebffischer for finding the reason here)
Thanks. I'm really impressed that you managed to track down a reproducible example!
This apparently happens because the minimal integer value represents NA in R
Yes, this was an oversight of mine, where I did not anticipate NA_integer_
. Looking at help("Random", package = "base")
, they only "alert" the reader that values can be negative;
"In the underlying C, .Random.seed[-1]
is unsigned; therefore in R .Random.seed[-1]
can be negative, due to the representation of an unsigned integer by a signed integer. "
but they forgot to mention the R_INT_MIN = -INT_MAX
<=> NA_integer_
relationship. @mb706 would you mind reporting this to https://bugs.r-project.org/, or to R-devel?
Forgot to say, I've submitted future.apply 1.11.3 to CRAN that fixes this.
In very rare circumstances,
next_random_seed()
infuture_xapply()
fails:This seems to happen because
.Random.seed
gains anNA
value...