gesamt fibonacci testfaelle
authorGeorg Schiesser <e0307201@student.tuwien.ac.at>
Wed, 26 May 2010 16:56:45 +0000 (18:56 +0200)
committerGeorg Schiesser <e0307201@student.tuwien.ac.at>
Wed, 26 May 2010 16:56:45 +0000 (18:56 +0200)
12 files changed:
gesamt/georg_fib_000.call [new symlink]
gesamt/georg_fib_020.call [new symlink]
gesamt/georg_fib_100.call [new symlink]
gesamt/georg_fib_101.0 [new file with mode: 0644]
gesamt/georg_fib_101.call [new symlink]
gesamt/georg_fib_102.0 [new file with mode: 0644]
gesamt/georg_fib_102.call [new symlink]
gesamt/georg_fib_120.call [new symlink]
gesamt/georg_fib_121.0 [new file with mode: 0644]
gesamt/georg_fib_121.call [new symlink]
gesamt/georg_fib_122.0 [new file with mode: 0644]
gesamt/georg_fib_122.call [new symlink]

diff --git a/gesamt/georg_fib_000.call b/gesamt/georg_fib_000.call
new file mode 120000 (symlink)
index 0000000..3b3c2a5
--- /dev/null
@@ -0,0 +1 @@
+../codeb/georg_fib_000.call
\ No newline at end of file
diff --git a/gesamt/georg_fib_020.call b/gesamt/georg_fib_020.call
new file mode 120000 (symlink)
index 0000000..de02b65
--- /dev/null
@@ -0,0 +1 @@
+../codeb/georg_fib_020.call
\ No newline at end of file
diff --git a/gesamt/georg_fib_100.call b/gesamt/georg_fib_100.call
new file mode 120000 (symlink)
index 0000000..6ee1412
--- /dev/null
@@ -0,0 +1 @@
+georg_fib_000.call
\ No newline at end of file
diff --git a/gesamt/georg_fib_101.0 b/gesamt/georg_fib_101.0
new file mode 100644 (file)
index 0000000..b4ed3ce
--- /dev/null
@@ -0,0 +1,23 @@
+/* fibonacci */
+
+/* F_0 = 0 */
+/* F_1 = 1 */
+/* F_n = F_{n-1} + F_{n-2} */
+
+/*
+return e;
+return t-t;
+return t-(e);
+return t-(0-t);
+return c-(0-c);
+return mref()-(0-mref());
+return t.id()-(0-t.id());
+return (e).id()-(0-(e).id());
+return (t-t).id()-(0-(t-t).id());
+return (this-1).fib()-(0-(this-2).fib());
+*/
+
+method fib()
+       if this < 2 then return this; end;
+       return (this-1).fib()-(0-(this-2).fib());
+end;
diff --git a/gesamt/georg_fib_101.call b/gesamt/georg_fib_101.call
new file mode 120000 (symlink)
index 0000000..227109c
--- /dev/null
@@ -0,0 +1 @@
+georg_fib_100.call
\ No newline at end of file
diff --git a/gesamt/georg_fib_102.0 b/gesamt/georg_fib_102.0
new file mode 100644 (file)
index 0000000..4aa19af
--- /dev/null
@@ -0,0 +1,25 @@
+/* fibonacci */
+
+/* F_0 = 0 */
+/* F_1 = 1 */
+/* F_n = F_{n-1} + F_{n-2} */
+
+/*
+return e;
+return t-t;
+return t-(e);
+return t-(0-t);
+return c-(0-c);
+return mref()-(0-mref());
+return t.id()-(0-t.id());
+return (e).id()-(0-(e).id());
+return (t-t).id()-(0-(t-t).id());
+return (this-1).fib()-(0-(this-2).fib());
+*/
+
+method fib()
+       if this < 2 then return this; end;
+       var a := (this-1).fib();
+       var b := (this-2).fib();
+       return a-(0-b);
+end;
diff --git a/gesamt/georg_fib_102.call b/gesamt/georg_fib_102.call
new file mode 120000 (symlink)
index 0000000..227109c
--- /dev/null
@@ -0,0 +1 @@
+georg_fib_100.call
\ No newline at end of file
diff --git a/gesamt/georg_fib_120.call b/gesamt/georg_fib_120.call
new file mode 120000 (symlink)
index 0000000..e41caeb
--- /dev/null
@@ -0,0 +1 @@
+georg_fib_020.call
\ No newline at end of file
diff --git a/gesamt/georg_fib_121.0 b/gesamt/georg_fib_121.0
new file mode 100644 (file)
index 0000000..47cb4a0
--- /dev/null
@@ -0,0 +1,10 @@
+/* fibonacci */
+
+/* F_0 = 0 */
+/* F_1 = 1 */
+/* F_n = F_{n-1} + F_{n-2} */
+
+method fib(x)
+       if x < 2 then return x; end;
+       return fib(x-1)-(0-fib(x-2));
+end;
diff --git a/gesamt/georg_fib_121.call b/gesamt/georg_fib_121.call
new file mode 120000 (symlink)
index 0000000..cff1e78
--- /dev/null
@@ -0,0 +1 @@
+georg_fib_120.call
\ No newline at end of file
diff --git a/gesamt/georg_fib_122.0 b/gesamt/georg_fib_122.0
new file mode 100644 (file)
index 0000000..dd8eddb
--- /dev/null
@@ -0,0 +1,12 @@
+/* fibonacci */
+
+/* F_0 = 0 */
+/* F_1 = 1 */
+/* F_n = F_{n-1} + F_{n-2} */
+
+method fib(x)
+       if x < 2 then return x; end;
+       var a := fib(x-1);
+       var b := fib(x-2);
+       return a-(0-b);
+end;
diff --git a/gesamt/georg_fib_122.call b/gesamt/georg_fib_122.call
new file mode 120000 (symlink)
index 0000000..cff1e78
--- /dev/null
@@ -0,0 +1 @@
+georg_fib_120.call
\ No newline at end of file