File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ circ trim(n) -> [
2+ cond n< -> var trimout = 0 + n / var trimout = trim(n>)
3+ trimout
4+ ]
5+ circ successor(n) -> [
6+ cond n -> var succtemp = ~((~(trim(n)))>) / var succtemp = 0
7+ cond (~n)< -> var succout = successor(succtemp) + 0 / var succout = succtemp + 1
8+ succout
9+ ]
10+ circ antisucc(n) -> [
11+ cond n -> var antitemp = ~((~(trim(n)))>) / var antitemp = 0
12+ cond (~n)< -> var antiout = antitemp + 0 / var antiout = antisucc(antitemp) + 1
13+ antiout
14+ ]
15+ circ add(a, b) -> [
16+ var addtemp = a
17+ cond b -> var addtemp = add(successor(addtemp), antisucc(b)) / var addtemp = addtemp
18+ addtemp
19+ ]
20+ circ sub(a, b) -> [
21+ var subtemp = a
22+ cond b -> var subtemp = sub(antisucc(subtemp), antisucc(b)) / var subtemp = subtemp
23+ subtemp
24+ ]
25+ circ mult(a, b) -> [
26+ var multtemp = a
27+ cond b -> var multtemp = add(mult(a, antisucc(b)), a) / var multtemp = sub(multtemp, a)
28+ multtemp
29+ ]
30+ circ square(a) -> mult(a, a)
You can’t perform that action at this time.
0 commit comments