Post Reply 
Hp Algorithm to create random numbers
08-23-2024, 01:42 PM
Post: #11
RE: Hp Algorithm to create random numbers
(08-21-2024 05:43 PM)DavidM Wrote:  Some examples

1E-13 RDZU => 1
12345. RDZU => 123450000000051
9.87654321098E295 RDZU => 987654321098961
0.000000000999 RDZU => 999001

RDZU seems to use 12 digits mantissa + 2 digits exponents (by MOD 100) + final 1 to make 15 digits

Code:
.000000 000000 1 E000   --> 000000 000000 001
.123450 000000   E005   --> 123450 000000 051
.987654 321098   E296   --> 987654 321098 961
.000000 000999   E000   --> 000000 000999 001

Mantissa first 12 digits is zero only when seed is small.
I would expect smaller seed (< 1E-13) would adjust exponent field. (to get state ??1)
This was my guess.

1E-13 --> 001
1E-14 --> 991
1E-15 --> 981
1E-16 --> 971
...

But when I try RDZ, above 4 cases all give random state 001
Only when seed get smaller, does this state pattern activated, why the gap?

1E-13 --> 001
1E-14 --> 001
1E-15 --> 001
1E-16 --> 001
1E-17 --> 991
1E-18 --> 981
1E-19 --> 971
...
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Hp Algorithm to create random numbers - Albert Chan - 08-23-2024 01:42 PM



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