Thread: Random numbers
View Single Post
Old 16 November 2020, 10:06   #9
a/b
Registered User

 
Join Date: Jun 2016
Location: europe
Posts: 298
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
a/b is offline  
 
Page generated in 0.04147 seconds with 11 queries