Ask Your Question

Random numbers [closed]

asked 2012-05-12 18:00:45 +0200

pstudier gravatar image

How does rand in <cmath> generate random numbers? Is it just a pseudo random sequence of integers divided by the max number? Is there a random seed?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-10-16 02:08:16.277243

2 Answers

Sort by » oldest newest most voted

answered 2012-05-13 02:28:15 +0200

m.a.riosv gravatar image

Searching for "cmath random numbers" in google. The first link:

edit flag offensive delete link more

answered 2012-05-13 05:05:39 +0200

jofilho gravatar image

In calc, we don't have a random seed, and the function RAND() returns a pseudo random number between 0 and 1. The "automatic seed", perhaps is the time.

edit flag offensive delete link more

Question Tools


Asked: 2012-05-12 18:00:45 +0200

Seen: 4,553 times

Last updated: May 13 '12