Editing
Randomness
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
''some random notes, quotes, & code'' [https://en.wikipedia.org/wiki/Randomness Wikipedia] <pre> Although randomness had often been viewed as an obstacle and a nuisance for many centuries, in the twentieth century computer scientists began to realize that the deliberate introduction of randomness into computations can be an effective tool for designing better algorithms. </pre> * [https://en.wikipedia.org/wiki/Algorithmically_random_sequence Algorithmic Randomness] * [https://en.wikipedia.org/wiki/Algorithmic_information_theory Algorithmic Information Theory] <pre> Unlike classical information theory, algorithmic information theory gives formal, rigorous definitions of a random string and a random infinite sequence that do not depend on physical or philosophical intuitions about nondeterminism or likelihood. </pre> ----- [https://docs.python.org/2/library/random.html Python] <pre> Python uses the Mersenne Twister as the core generator. It produces 53-bit precision floats and has a period of 2**19937-1 [...] However, being completely deterministic, it is not suitable for all purposes, and is completely unsuitable for cryptographic purposes. </pre> (Mersenne Twister replaced Wichmann-Hill as default generator in Python 2.3) <pre> The random module also provides the SystemRandom class which uses the system function os.urandom() to generate random numbers from sources provided by the operating system. </pre> example: <pre> import random foo = random.getrandbits(1024) # mersenne twister, returns arbitrarily long integer print(bin(foo)) altrand = random.SystemRandom() # not available on all systems, assumes entropy source bar = altrand.getrandbits(1024) print(bin(bar)) </pre> [[Category:Math]]
Summary:
Please note that all contributions to Noisebridge are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Noisebridge:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Request account
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Dig in!
Noisebridge
- Status: MOVED
- Donate
- ABOUT
- Accessibility
- Vision
- Blog
Manual
MANUAL
Visitors
Participation
Community Standards
Channels
Operations
Events
EVENTS
Guilds
GUILDS
- Meta
- Electronics
- Fabrication
- Games
- Music
- Library
- Neuro
- Philosophy
- Funding
- Art
- Crypto
- Documentation/Wiki
Wiki
Recent Changes
Random Page
Help
Categories
(Edit)
Tools
What links here
Related changes
Special pages
Page information