about summary refs log tree commit diff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md37
1 files changed, 37 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..fd5f353
--- /dev/null
+++ b/README.md
@@ -0,0 +1,37 @@
+# Mersenne Twister
+
+*(readme mostly ripped straight from another projects notes about*
+*it's implementation of mt19937. That's also where I ripped the lib.rs*
+*file from. i just wanted to use it in another project so i thought*
+*i was extract it. this is a port and not using a crate from crates.io*
+*because i thought it would be fun and thrilling. i was right)*
+
+https://en.wikipedia.org/wiki/Mersenne_Twister
+
+I've been doing research on Mersenne Twister. Apparently if you seed
+it poorly, a "bad seed", with a run of lots of 1s of 0s, you can get
+into a bad state that can take a long time to recover (citation needed).
+
+This S.O. answer about seeding Mersenne mentions there are other PRNGs
+that are easier to implement. https://stackoverflow.com/a/8473025
+
+Checked against the (original?) Mersenne Twister website.
+	https://www.math.sci.hiroshima-u.ac.jp/m-mat/MT/emt.html
+It has the latest version of the algorithm up at
+	https://www.math.sci.hiroshima-u.ac.jp/m-mat/MT/MT2002/emt19937ar.html
+which has output that we can test against here
+	https://www.math.sci.hiroshima-u.ac.jp/m-mat/MT/MT2002/CODES/mt19937ar.out
+and it all matches! both the u32 generator and the double "real" (f64)
+generator.
+
+License:  
+From the [license page for MT](https://www.math.sci.hiroshima-u.ac.jp/m-mat/MT/MT2002/elicense.html).  
+> Until 2001/4/6, MT had been distributed under GNU Public License, but after
+> 2001/4/6, we decided to let MT be used for any purpose, including commercial
+> use. 2002-versions mt19937ar.c, mt19937ar-cok.c are considered to be usable freely.
+
+Given that seeming dedication to the public domain, this is in turn rightly
+licensed as such. If that does not work for you, there is a LICENSE file
+with Creative Commons Zero, too, that I stuck in the repo. Can I do that?
+Iunno, I'm not a lawyer. I think probably, yes, since it seems to be
+dedicated to the public domain, anyway.
\ No newline at end of file