That is a gross exaggeration.neil wrote:all you ever do is make fun of and criticise people.
Thank you.I know now that I will never ask you for help;
That is a gross exaggeration.neil wrote:all you ever do is make fun of and criticise people.
Thank you.I know now that I will never ask you for help;
neil wrote:I did some research on the quantum world and its interesting.
See what I mean, folks.I am still researching it.
I missed my chance?deltarho[1859] wrote: ↑Apr 02, 2023 16:16 Actually, it may be a good idea to depart this thread before the admin has a word with me.
Departed.
Yes, I was pushing it.codeJeff wrote:I missed my chance?
I don't. There have been some excellent PRNGs put forward since I joined FreeBASIC six years ago. Neil presented a PRNG first mentioned by John Cook fifteen years ago. Cook should have 'pulled ' that Code Project years ago because it is not a strong PRNG. The opening post looks at (r1 mod 256) as a small prng number 0 - 255. If r1 is random, there is no guarantee that (r1 mod 256) will be.I sympathize with neil.
Code: Select all
a *= a
a xor= b
b += 1
Code: Select all
randomize ,3 '[3|5]
function rnd32 as ulong
return rnd * 4294967295
end function
function rnd64 as ulongint
union rndunion
as ulongint n64
as ulong n32(1)
end union
dim as rndunion number
number.n32(0) = rnd * 4294967295
number.n32(1) = rnd * 4294967295
return number.n64
end function
do
print rnd32, rnd64
loop until getkey = 27 ' Esc
Code: Select all
Randomize ,3 '[3|5]
Function rnd32 As ULong
Return Rnd*2^32
End Function
Function rnd64 As ULongInt
Return (Cast( ULongInt, Rnd*2^32 ) Shl 32) Or Cast( ULongInt, Rnd*2^32 )
End Function
Do
Print rnd32, rnd64
Loop Until GetKey = 27 ' Esc