diff options
author | elioat <elioat@tilde.institute> | 2024-03-14 18:47:17 -0400 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2024-03-14 18:47:17 -0400 |
commit | aa208e440331a4b4ed5d7ca1af6a0962adec628e (patch) | |
tree | 4b8d81705154952c8e59c70ba69a21231578d6cc | |
parent | 9e3d80a7dcb9530fefaee76643e3943570ac0d2d (diff) | |
download | tour-aa208e440331a4b4ed5d7ca1af6a0962adec628e.tar.gz |
*
-rw-r--r-- | js/mandelbrot/index.html | 2 | ||||
-rw-r--r-- | picat/fib.pi | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/js/mandelbrot/index.html b/js/mandelbrot/index.html index 23ad2cb..ed220a6 100644 --- a/js/mandelbrot/index.html +++ b/js/mandelbrot/index.html @@ -6,7 +6,7 @@ <title>Mandelbrot</title> </head> <body> - <canvas id="mandelbrot" width="800" height="800"></canvas> + <canvas id="mandelbrot" width="1000" height="1000"></canvas> <script src="mb.js"></script> </body> </html> \ No newline at end of file diff --git a/picat/fib.pi b/picat/fib.pi new file mode 100644 index 0000000..2f852cd --- /dev/null +++ b/picat/fib.pi @@ -0,0 +1,18 @@ +main => +S = 0, + I = 1, + F = fib(I), + while (F <= 4000000) + if (F mod 2 == 0) then + S := S+F + end, + I := I+1, + F := fib(I) + end, + printf("Sum of the even-valued terms is %w%n",S). +main([A1]) => + printf("fib(%s)=%w%n",A1,A1.to_integer().fib()). +table +fib(1) = 1. +fib(2) = 2. +fib(N) = fib(N-1)+fib(N-2). \ No newline at end of file |