4069cf5701
Like many prngs, xorshift breaks down when the internal state is 0. The common fix is to explicitly check for this and replace with a 1 when this happens (usually when seeding, in this API we have to check every update, this is less efficient but I don't think we really care). As a slight tweak, this now checks for 0 but replaces it with -1. This makes seed=0 different from seed=1, which is nice when using seed=range(0,n) in tests/benches.