RND() function seems biased

From Liberty BASIC Family
Revision as of 03:03, 11 October 2023 by StPendl (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Description

The RND() function seems to result in a predictable sequence of numbers despite of changing the seed for each execution of RND().

Example code to demonstrate the bug.

Carl requesting pointers to a better algorithm at the old community forum

Example code to work around the bug.

As a solution, see the Mersenne Twister thread at the old community forum.