aboutsummaryrefslogtreecommitdiffstats
path: root/ManyFunctionsGenerator.py
diff options
context:
space:
mode:
Diffstat (limited to 'ManyFunctionsGenerator.py')
-rw-r--r--ManyFunctionsGenerator.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/ManyFunctionsGenerator.py b/ManyFunctionsGenerator.py
new file mode 100644
index 00000000..b4f36af0
--- /dev/null
+++ b/ManyFunctionsGenerator.py
@@ -0,0 +1,24 @@
+
+n = 100
+
+splitNumBegin = 128 - (n / 2)
+i = 1
+
+template = """
+ function right{0}(uint seed) returns (uint) {{
+ var r = nextRand(seed);
+ if (r >= 2**{2})
+ return right{1}(r);
+ return left{1}(r);
+ }}
+
+ function left{0}(uint seed) returns (uint) {{
+ var r = nextRand(nextRand(seed));
+ if (r >= 2**{2})
+ return left{1}(r);
+ return right{1}(r);
+ }}
+"""
+
+for i in range(1, n):
+ print template.format(i, i + 1, i + splitNumBegin) \ No newline at end of file