Description
The docs for numpy.random.RandomState say:
Compatibility Guarantee A fixed seed and a fixed series of calls
to ‘RandomState’ methods using the same parameters will always
produce the same results up to roundoff error [...]
Question: in this context, does "always" mean that this guarantee should apply across platforms and machines, or just that it should apply across runs on a single machine?
If the latter, then the "up to roundoff error" is probably unnecessary, which leads me to believe that the intent is that the guarantee should apply across platforms. But now I'm failing to see how it's possible to make such a guarantee: some of the sample generation methods use the rejection method, and so consume some (unknown in advance) number of random samples. The number of samples actually consumed may depend on floating-point and libm variations. A good example is the zipf distribution:
numpy/numpy/random/mtrand/distributions.c
Lines 720 to 742 in b94c2b0
Here, the number of calls to rk_double for a given a
and random state may change depending on tiny floating-point differences in the result of pow
(for example).
Should the guarantee be restricted to some subset of the RandomState methods?
Related: #6180 (where the wording explicitly includes "regardless of platform"), #6405 (where it doesn't).