Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RND and RANDOMIZE information
#2
(04-28-2025, 08:29 AM)SMcNeill Wrote: I wonder how QB64's formula compares against QB45's. If anyone has a version of QB45 they can run, can you kindly tell me what the output might be for the following:

Code: (Select All)
FOR i = 1 TO 20
    PRINT RND, Rand
NEXT

FUNCTION Rand
    STATIC Seed
    x1 = (Seed * 214013 + 2531011) MOD 2 ^ 24
    Seed = x1
    Rand = x1 / 2 ^ 24
END FUNCTION



[Image: Screenshot-2025-04-28-11-34-08.png]
Reply


Messages In This Thread
RND and RANDOMIZE information - by SMcNeill - 04-28-2025, 08:29 AM
RE: RND and RANDOMIZE information - by tantalus - 04-28-2025, 10:38 AM



Users browsing this thread: 1 Guest(s)