+ 4

How does a random function works?

I was thinking how does a library random function works .can anyone tell me how it works

5th Mar 2018, 1:39 PM
Saksham Jain
Saksham Jain - avatar
10 Réponses
0
Pseudorandom (predictable): Takes a number from a seed (very long number), does math to it, returns it. Other: If you aren't looking too close, the amount of radiation is random. There is always a bit radiation. Take that number, do math to it and return it. For more explanation: Try Google.
5th Mar 2018, 2:03 PM
D B
D B - avatar
+ 1
See my code here.. perhaps this could help you.. This is in Java.. Random rand = new Random(); int randomNum = rand.nextInt(); Here, randomNum is our any random number. You can try this on the code playground.
5th Mar 2018, 2:29 PM
Aaron Stone
Aaron Stone - avatar
+ 1
I was not asking its function . I am asking how does it works. when you use a function random(). what dos the function do and how can random nos. be generated without the library function
5th Mar 2018, 2:46 PM
Saksham Jain
Saksham Jain - avatar
+ 1
I have Seen your answer
6th Mar 2018, 4:29 AM
Saksham Jain
Saksham Jain - avatar
+ 1
I think u should give more explanation
6th Mar 2018, 7:56 AM
Saksham Jain
Saksham Jain - avatar
+ 1
try later
7th Mar 2018, 2:44 AM
Saksham Jain
Saksham Jain - avatar
0
Using time. seconds. milliseconds. And modify. I think. :)
5th Mar 2018, 1:55 PM
Rumark Lumampoc
Rumark Lumampoc - avatar
0
See my answer or the documentation of that method of Java.
5th Mar 2018, 3:54 PM
D B
D B - avatar
0
So? Was it not clear enough? Tell me if I should explain it again using other words...
6th Mar 2018, 6:01 AM
D B
D B - avatar
0
I can not post an answer cuz "no Connection"
6th Mar 2018, 2:43 PM
D B
D B - avatar