Post Reply 
New PRNG for calculators
08-08-2024, 05:48 PM (This post was last modified: 08-09-2024 12:58 PM by SlideRule.)
Post: #15
RE: New PRNG for calculators
Stumbled on Example 4: HP-25 Pocket Calculator, Computational Statistics, 25th Conference, page 131

"The pseudorandom numbers of the HP-25 pocket calculator are generated
by the algorithm
                               ui ≡ ( ui-1+3)5    (mod 1)

With a seed u0, 0 < u0 < 1, the floating-point arithmetic creates sequences
which behave as demonstrated in Example 1. After a more or less ran-
dom behaviour they enter a short subsequence repeating itself. The HP-25
calculator may enter such a cycle of only 29 numbers.

This effect can be attributed to the rounding errors of the floating-point
arithmetic. The generators of the BASIC interpreters on the Commodore
and Apple microcomputers (CBM PET 2001 Series and Apple II europlus )
are further examples for generators having this defect. They are described
and analysed in Afflerbach (1985) and Ripley ( 1987, p.18 ). In Afferbach
(1985) it is shown that they may reach short cycles of period 202 and 703,
respectively. Examples 3 and 4 elucidate why congruential generators de-
fined by integer calculations ( and division by the modulus ) should be pre-
ferred to congruential generators mod 1. More about the implementation of
pseudorandom number generators can be found in Gentle (1990) and Ripley
( 1990 )."

BEST!9SlideRule
argh - yet another senior moment!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
New PRNG for calculators - Namir - 06-06-2024, 08:17 PM
RE: New PRNG for calculators - KeithB - 06-06-2024, 08:30 PM
RE: New PRNG for calculators - Namir - 06-06-2024, 08:37 PM
RE: New PRNG for calculators - ttw - 06-07-2024, 01:35 AM
RE: New PRNG for calculators - Namir - 06-07-2024, 02:05 AM
RE: New PRNG for calculators - Namir - 06-07-2024, 02:14 AM
RE: New PRNG for calculators - ttw - 06-07-2024, 03:32 AM
RE: New PRNG for calculators - Namir - 06-07-2024, 08:55 PM
RE: New PRNG for calculators - Albert Chan - 06-07-2024, 09:45 PM
RE: New PRNG for calculators - ttw - 06-08-2024, 02:51 AM
RE: New PRNG for calculators - Albert Chan - 06-08-2024, 01:46 PM
RE: New PRNG for calculators - ttw - 06-08-2024, 03:44 PM
RE: New PRNG for calculators - Albert Chan - 06-08-2024, 06:19 PM
RE: New PRNG for calculators - SlideRule - 08-08-2024 05:48 PM
RE: New PRNG for calculators - Namir - 08-09-2024, 08:16 PM
RE: New PRNG for calculators - KeithB - 08-08-2024, 06:57 PM
RE: New PRNG for calculators - Namir - 08-09-2024, 12:39 PM
RE: New PRNG for calculators - EdS2 - 08-09-2024, 05:41 AM
RE: New PRNG for calculators - KeithB - 08-09-2024, 01:26 PM
RE: New PRNG for calculators - Namir - 08-11-2024, 02:20 PM



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