Rand- 16 bits only????

Miscellaneous Forums/Blitz Showcase/Rand- 16 bits only????

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

This used to be true.

But with more recent versions of Blitz the values are 32-bit.

Edit: I've just tested this with Blitz3D 1.85 and it looks like random numbers have changed.

For k = 1 To 10
	n = Rand(-2100000000,2100000000)
	DebugLog Bin(n)
Next
Stop

This produces:

10000000110100010010100101101100
01111110100110001101000000101000
10000001000010010001101001111000
10000000100010100000000111111000
01111111100010111000110100000100
01111110110101100111101101000000
01111111100011111100011000101100
10000010001110011110001010110001
10000010110001101111101001001010
01111111010110011111101000110100

These are 32-bit values.

But those bits sure don't look sufficiently random.
I see far too many large blocks of 000000... and 111111...

And here's the output from BlitzPlus 1.37

11101011101110000011110100000000
10111000000010110000111010000000
00110000101000110001110000000000
10101000001110001011100100000000
00010001110000010100110100000000
10101101011111101010101010000000
01000001011101101010110000000000
11011110011111110010100000000000
11110100111101111110110110000000
00010101101101011011011100000000

What's with all those zeroes on the right?