     m 1 - iota [
         n m - 1 + + >fixnum :> i
         i array nth-unsafe
-        m-n i + array nth-unsafe
+        m n - i + array nth-unsafe
         mask state r1>> state r2>> formula :> r
 
         r i array set-nth-unsafe

        swap >>m
        swap >>n
        swap >>seed
        dup [ m>> ] [ n>> ] bi - >>m-n
        0 >>ix ;

: <sfmt> ( seed n m mask -- sfmt )

PRIVATE>

M: sfmt random-32* ( sfmt -- n )
    dup refill-sfmt? [ dup generate ] when next ; inline

: <sfmt-19937> ( seed -- sfmt )
    348 330 uint-4{ HEX: BFFFFFF6 HEX: BFFAFFFF HEX: DDFECB7F HEX: DFFFFFEF }
    <sfmt> ; inline
