Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.asm.x86    |    Ahh, the lost art of x86 assembly    |    4,675 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 3,237 of 4,675    |
|    aen@nospicedham.spamtrap.com to Steve    |
|    Re: Backward LCG    |
|    17 Jan 18 11:32:38    |
      On Tue, 16 Jan 2018 19:22:29 GMT, Bogus@Embarq.com (Steve) wrote:       >...       >That had not occured to me. I have now wasted a fair       >amount of time on it, and related ideas. Albeit I am first       >looking at smaller sized numbers, rather than 64-bit.       >...       On a 32-bit machine I used the code below for 2 LCGs:              rngX:        imul eax,[X],1812433253        inc eax        mov [X],eax        ret              rrngX:        mov eax,[X]        dec eax        imul eax,2520285293        mov [X],eax        ret              ###              rngY:        imul eax,[Y],1566083941        inc eax        mov [Y],eax        ret              rrngY:        mov eax,[Y]        dec eax        imul eax,1786162797        mov [Y],eax        ret              I wrote a program that reads an odd number between 1-4294967295 from       the command line, and uses the extended gcd algorithm to calculate and       output the multiplicative inverse.       --       aen              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca