# Is the 'rand' function in Calc truly random?

Is the 'rand' function in Calc truly random?

First time here? Check out the FAQ!

Is the 'rand' function in Calc truly random?

Is the 'rand' function in Calc truly random?

add a comment

2

As explained in the link from @erAck, Calc's numbers are pseudorandom.

Truly random numbers cannot be created by computation, because that is predictable. The only way to get truly random numbers is to extract from physical phenomena such as atmospheric noise, and that must be fed into the computer in some way.

1

Is that https://gizmodo.com/canadas-random-im... If so, then that's just plain wrong, since although Excel does use a pseudo-random generator (the same as we do, afaik), it is the generated sequence distribution characteristic that matters (and it's fine), and it's wrong that "If you know one number at one step, you can compute all the numbers that will follow" - that "Prof. L’Ecuyer"'s citation is just a BS.

The crucial part is "If you know one number **at one step**" so yes, *if* the PRNG is seeded with the same value in each initialization *then* the same sequence repeats in all runs. But LibreOffice uses std::random_device and time to seed. One can of course compute all sequences for all possible seed values and then take the last some generated numbers to lookup that partial sequence in those tables to predict subsequent numbers.

2

1

If you are using a Unix variant system e.g. Linux, OSX, BSD etc. you have /dev/random wich is a respectable source of randomness.

See this page, it is quite informative, BSD style. https://www.freebsd.org/cgi/man.cgi?q...

Asked: ** 2018-06-12 15:13:10 +0100 **

Seen: **125 times**

Last updated: **Jun 13 '18**

Format a cell so it automatically adds PM after the time

Is it possible to impose a limit (columns and rows) on spreadsheet size? [closed]

Modify named range in Calc [closed]

How can I find a string starting from right to left

Invoice number and auto increment [closed]

Why do I get error message 502 when using INTRATE() function? [closed]

Why does Libre Office suddenly not recognize java?

A Libre Office file saved to windows 10 [closed]

Insert chart from calc into writer [closed]

Is it possible to edit a calc file from multiple computers via a cloud sync service? [closed]

Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.