fultonbot Posted June 19, 2021 Share Posted June 19, 2021 (edited) If I seed rand like this: rand = 15 and then do this: a = rand b = rand c = rand Should I expect a,b and c to always be the same numbers based on the seed? Not the same as each other mind you, the same sequence in the same order. This is what I expected to see, but not what I'm seeing. Edited June 19, 2021 by fultonbot Quote Link to comment Share on other sites More sharing options...
BydoEmpire Posted June 19, 2021 Share Posted June 19, 2021 Interesting, that's what I assumed, but I've never verified one way or another. Quote Link to comment Share on other sites More sharing options...
RevEng Posted June 19, 2021 Share Posted June 19, 2021 It's a 16-bit LFSR. "rand16" holds the upper part of the seed. Try something like... rand=15 rand16=42 1 Quote Link to comment Share on other sites More sharing options...
fultonbot Posted June 19, 2021 Author Share Posted June 19, 2021 45 minutes ago, RevEng said: It's a 16-bit LFSR. "rand16" holds the upper part of the seed. Try something like... rand=15 rand16=42 That did it!! Thanks! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.