From: Georg Schiesser Date: Wed, 26 May 2010 16:56:45 +0000 (+0200) Subject: gesamt fibonacci testfaelle X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=testub10.git;a=commitdiff_plain;h=bf6f4a4da8f92b734d8cfa6f0ab29f8444bb3d6b gesamt fibonacci testfaelle --- diff --git a/gesamt/georg_fib_000.call b/gesamt/georg_fib_000.call new file mode 120000 index 0000000..3b3c2a5 --- /dev/null +++ b/gesamt/georg_fib_000.call @@ -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 index 0000000..de02b65 --- /dev/null +++ b/gesamt/georg_fib_020.call @@ -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 index 0000000..6ee1412 --- /dev/null +++ b/gesamt/georg_fib_100.call @@ -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 index 0000000..b4ed3ce --- /dev/null +++ b/gesamt/georg_fib_101.0 @@ -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 index 0000000..227109c --- /dev/null +++ b/gesamt/georg_fib_101.call @@ -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 index 0000000..4aa19af --- /dev/null +++ b/gesamt/georg_fib_102.0 @@ -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 index 0000000..227109c --- /dev/null +++ b/gesamt/georg_fib_102.call @@ -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 index 0000000..e41caeb --- /dev/null +++ b/gesamt/georg_fib_120.call @@ -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 index 0000000..47cb4a0 --- /dev/null +++ b/gesamt/georg_fib_121.0 @@ -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 index 0000000..cff1e78 --- /dev/null +++ b/gesamt/georg_fib_121.call @@ -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 index 0000000..dd8eddb --- /dev/null +++ b/gesamt/georg_fib_122.0 @@ -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 index 0000000..cff1e78 --- /dev/null +++ b/gesamt/georg_fib_122.call @@ -0,0 +1 @@ +georg_fib_120.call \ No newline at end of file