Thread: Random numbers
View Single Post
Old 16 November 2020, 09:50   #11
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,233
Quote:
Originally Posted by a/b View Post
1. short
2. fast
3. accurate
Pick two :P.

This is a quick&dirty one that works for me:
Code:
Init:    move.l    #<seed>,d7    ; large prime numbers
    move.l    #$6be7d35b,d6    ; are good...

Rng:    swap    d7
    add.l    d6,d7
    eor.l    d6,d7
It's based on this: https://en.wikipedia.org/wiki/Xorshift
Looks like snake oil to me. Is there anything documented about the properties of this generator.
Thomas Richter is offline  
 
Page generated in 0.08477 seconds with 11 queries