Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AbrahamR, wdlmaster, 7th_zorro, dr_panther, 1 invisible), 764 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
random/integer #292544
10/04/09 16:43
10/04/09 16:43
Joined: May 2006
Posts: 50
austria
R
roald Offline OP
Junior Member
roald  Offline OP
Junior Member
R

Joined: May 2006
Posts: 50
austria
hi...

well, can you tell me which algorithm GS uses to create random values (integer);

you know that random is NOT random (higher values are generated more than lower values)

thx
roald

Re: random/integer [Re: roald] #292607
10/05/09 08:54
10/05/09 08:54
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Software programs are deterministic, thus you're right that nothing is random unless you plug in a hardware random generator. But of course there are no "higher values generated more than lower values". The distribution is pretty even. For details about the algorithm you could probably get information on the Microsoft VC++ forum. The random functions are part of the standard C library.


Re: random/integer [Re: jcl] #292611
10/05/09 09:59
10/05/09 09:59
Joined: May 2006
Posts: 50
austria
R
roald Offline OP
Junior Member
roald  Offline OP
Junior Member
R

Joined: May 2006
Posts: 50
austria
thx for your fast reply...

well, generating 100 000 values (range 1 -100) 50 times i HAVE a divergence at higher values...

but, as you recommended, i will read the microsoft VC++ docs...

thx again
dietmar



Last edited by roald; 10/05/09 10:01.

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1