-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests.py
62 lines (48 loc) · 1.77 KB
/
tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import sys
from apref import *
if __name__=='__main__':
setDebugMode(True)
print parallelize('''fac :: Integer -> Integer
fac 1 = 1
fac n = n * fac(n-1)''')
print ''
print parallelize('''f :: Integer -> Integer
f 1 = y0
f n = y!!n + (1+r) * f(n-1)*2 + y!!n''')
print ''
print parallelize('''f :: Integer -> Integer
f 1 = 1
f n = n + (1+1) * f(n-1)*2 + n''')
print ''
print parallelize('''f :: Integer -> Integer
f 1 = 1
f n = (1+1) * f(n-1) + n''')
print ''
print parallelize('''f :: Rational -> Rational
f 0 = 2000
f n = (1 + 0.005) * f(n-1) + 100''',True,True)
print ''
print parallelize('''f :: Rational -> Rational
f 0 = 2000
f n = 100 + (1 + 0.005) * f(n-1)''')
print ''
print parallelize('''f :: Integer -> IMG_SET
f e_0 = y_0
f n = g_1(n) ++ f(n-e_1) ++ g_2(n)''')
print ''
print parallelize('''f :: Integer -> IMG_SET
f e_0 = y_0
f n = g_1(n) ++ g_3(n) *** f(n-e_1) *** g_4(n) ++ g_2(n)''')
print ''
print parallelize('''f :: Integer -> String
f 0 = ""
f n = (show n) ++ f(n-1) ++ (show n)''')
print ''
print parallelize('''f :: Integer -> Rational
f 1 = 1
f n = (2*(2*n-1)/(n+1)) * f(n-1)''')
print ''
print parallelize('''f :: Integer -> Integer
f 0 = 0
f n = 1 + f(n-1)''')
print ''