RND() function seems biased

From Liberty BASIC Family
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.