Ask Your Question
0

Random numbers

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

pstudier gravatar image pstudier
1 2 3

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?

delete close flag offensive retag edit

2 Answers

Sort by » oldest newest most voted
0

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

mariosv gravatar image mariosv flag of Spain
4749 20 46

Searching for "cmath random numbers" in google. The first link: http://www.cplusplus.com/reference/clibrary/cstdlib/rand/

link delete flag offensive edit
0

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

jofilho gravatar image jofilho flag of Brazil
503 2 10

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.

link delete flag offensive edit

Login/Signup to Answer

Donate

LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!

Question tools

Follow

subscribe to rss feed

Stats

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

Seen: 663 times

Last updated: May 13 '12