Good news for PPC Random-Number Generator
05-19-2021, 11:53 PM
Post: #22
 Albert Chan Senior Member Posts: 2,230 Joined: Jul 2018
RE: Good news for PPC Random-Number Generator
(05-19-2021 10:04 PM)Thomas Okken Wrote:  With the HP-42S (and RPL, Free42, 71B) RNG, just looking for a repeated number is not sufficient, since they use a 15-digit seed internally, and then truncate it to 12 digits before returning it to the user code environment.

Last 3 digits are hidden, but is easily deduced.
Example, I just tried Free42 RAN, and get 0.248998059347, 0.866775882678

>>> a, m = 2851130928467, 10**15
>>> x1, x2 = 248998059347, 866775882678
>>> t = x1 * 1000
>>> [t+b for b in range(1000) if (t+b)*a % m // 1000 == x2]
[248998059347131L]
>>> _[0] * a % m
866775882678177L
>>> _ * a % m
34252568964659L

It predicted next RAN is 0.0342525689646, which is indeed the case.

Quote: The least significant of those 15 digits is always a 1, 3, 7, or 9, so the theoretical maximum cycle is 4e14 long, but I don't know if the actual cycles exhibited by that RNG are that long or whether there are multiple disjoint cycles.

Period is 5E13, from Joe Horn's post
 « Next Oldest | Next Newest »

 Messages In This Thread Good news for PPC Random-Number Generator - Namir - 05-17-2021, 07:51 PM RE: Good news for PPC Random-Number Generator - Gene - 05-17-2021, 09:01 PM RE: Good news for PPC Random-Number Generator - Namir - 05-17-2021, 09:19 PM RE: Good news for PPC Random-Number Generator - Sylvain Cote - 05-17-2021, 11:03 PM RE: Good news for PPC Random-Number Generator - Massimo Gnerucci - 05-18-2021, 06:02 AM RE: Good news for PPC Random-Number Generator - Thomas Okken - 05-19-2021, 03:18 PM RE: Good news for PPC Random-Number Generator - Dave Britten - 05-17-2021, 10:56 PM RE: Good news for PPC Random-Number Generator - Namir - 05-18-2021, 03:13 AM RE: Good news for PPC Random-Number Generator - Craig Bladow - 05-17-2021, 11:03 PM RE: Good news for PPC Random-Number Generator - Albert Chan - 05-17-2021, 11:35 PM RE: Good news for PPC Random-Number Generator - Namir - 05-18-2021, 03:15 AM RE: Good news for PPC Random-Number Generator - Craig Bladow - 05-19-2021, 01:48 AM RE: Good news for PPC Random-Number Generator - Namir - 05-19-2021, 03:29 AM RE: Good news for PPC Random-Number Generator - Craig Bladow - 05-19-2021, 01:20 PM RE: Good news for PPC Random-Number Generator - Valentin Albillo - 05-19-2021, 03:23 PM RE: Good news for PPC Random-Number Generator - Valentin Albillo - 05-19-2021, 02:18 AM RE: Good news for PPC Random-Number Generator - Valentin Albillo - 05-17-2021, 11:50 PM RE: Good news for PPC Random-Number Generator - Namir - 05-18-2021, 10:35 AM RE: Good news for PPC Random-Number Generator - rprosperi - 05-19-2021, 05:41 PM RE: Good news for PPC Random-Number Generator - Valentin Albillo - 05-19-2021, 06:31 PM RE: Good news for PPC Random-Number Generator - Thomas Okken - 05-19-2021, 10:04 PM RE: Good news for PPC Random-Number Generator - Albert Chan - 05-19-2021 11:53 PM RE: Good news for PPC Random-Number Generator - rprosperi - 05-20-2021, 12:49 AM

User(s) browsing this thread: 1 Guest(s)