Example Maxima programs and commands Extended-precision calculations # # Everything between "#" and the end of a line is a comment. # # Set the floating-point precision to 30 digits: fpprec:30; # Compute the value to the current floating point precision: bfloat(sqrt(2)); # Daubechies' filters (from ACHA, 1996): p[n]:=sum(binomial(n-1+j,j)*s2^j,j,0,n-1); pol[n]:=expand(z^(n-1)*subst((1-(z+1/z)/2)/2,s2,p[n])); roo[n]:=allroots(pol[n]); prod[n]:=expand(product( (z-rhs(first(rest(roo[n],j)))) ,j,0,n-2) ); rprod[n]:=realpart(prod[n]); norm[n]:=subst(1,z,rprod[n]); m0[n]:=expand(sqrt(2)*(1+z)^n/2^n*rprod[n]/norm[n]); # Compute the filter coefficients to `fpprec' digits: fpprec:100; bfloat(m0[1]); bfloat(m0[2]); m0[3], bfloat;