Thanks very much for the Fortran version. I made a mistake in the comment on versions for signed integers. This:

Languages requiring signed integers should use equivalents of the same operations, except that the C statement: c=(t<x)+(x>>19); can be replaced by that language's version of if sign(x<<13+c)=sign(x) then c=sign(x)+(x>>19) else c=1-sign(t)+(x>>19)

should have been:

Languages requiring signed integers should use equivalents of the same operations, except that the C statement: c=(t<x)+(x>>19); can be replaced by that language's version of if sign(x<<13+c)=sign(x) then c=sign(x)+(x>>19) else c=1-sign(x<<13+c)+(x>>19)

Sorry for that error.

I still like inline functions in Fortan,so would tend to define isign(x)=ishft(x,-31)and m=ishft(x,13)+c if(isign(m).eq.isign(x)) then c=isign(x)+ishft(x,-19) else c=1-isign(m)+ishft(x,-19)and Q[j]=m+x

If calculating the carry c of the MWC operation fails to fix that extra increment properly, then rather than a systematic expansion, in reverse order, 32 bits at a time, of the binary representation of j/(1893*2^150112-1) for some j determined by the random seeds, we will be jumping around in that expansion, and we can't be sure that the period will still be the order of b=2^32 for the prime p=1893*b^4196-1.