Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Export["output.jpg", %29, "JPEG"]
- Hex[exp_] := FromDigits[exp, 16];
- LByte[exp_] := BitAnd[exp, Hex@"00ff"];
- HByte[exp_] := BitAnd[exp, Hex@"ff00"]~BitShiftRight~8;
- PRNG[v_] := Module[{L5, H5, v1, v2, carry},
- L5 = LByte@v*5;
- H5 = HByte@v*5;
- v1 = LByte@H5 + HByte@L5 + 1;
- carry = HByte@v1~BitGet~0;
- v2 = BitShiftLeft[LByte@v1, 8] + LByte@L5;
- Mod[v2 + Hex@"0011" + carry, Hex@"ffff" + 1]
- ];
- );
- mappings = # -> PRNG@# & /@ Range[0, Hex@"ffff"];
- GraphPlot[mappings]
Add Comment
Please, Sign In to add comment