On 09/02/2011 05:02 AM, PHOENIX PERCIVAL wrote:
> Hello,
> I would like to know how I could implement an algorithm in maxima.
> I want run the following algorithm;
>
> " Initialize: d=(3+sqrt(8))^n; d=(d+1/d)/2;
> b=-1; c=-d; s=0;
> For k=0 up to k=n-1, repeat:
> c=b-c; s=s+c*a_k;
> b=(k+n)*(k-n)*b/((k+0.5)*(k+1));
> Output: s/d. "
>
> I am attaching the original PDF file of the algorithm. The one I want
> to run in maxima is 'Algorithm 1'.
>
> Thank you.
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
Hello,
I'd suggest start reading the following documentation:
? block
? do
? :=
There are some simple examples there.
In the share folder in your Maxima installation, there are lots of files
with extension mac, which are written in Maxima language. Take a look at
them to get an idea how Maxima functions look like.
If you encounter problems, please let us know.
--
Mario