[Maxima] mnewton

Andrej Vodopivec andrej.vodopivec at gmail.com
Tue Jul 17 09:40:11 CDT 2007


The patch uses complexfield (which is the field of complex floating
point numbers of the type double). To support bigfloats other parts of
mnewton should also be modified, so I didn't do that (it wouldn't be
hard). I guess there could be a switch which would control which field
should be used.

Andrej

On 7/17/07, Barton Willis <willisb at unk.edu> wrote:
>
> -----maxima-bounces at math.utexas.edu wrote: -----
>
>
> >Does the linearalgebra package have switches to allow the calculations
> >to be done with arbitrarily large precision?
>
> Yes. The undocumented function 'linsolve_by_lu' solves a linear system
> using partial
> pivoting:
>
> (%i1) m : vandermonde_matrix([2,3,42])$
> (%i2) b : matrix([1],[1],[4])$
>
> Solve using rational arithmetic without partial pivoting;
>
> (%i3) linsolve_by_lu(m,b);
> (%o3) [matrix([263/260],[-1/104],[1/520]),false]
>
> Solve using double floats and partial pivoting; the second list member
> in (%o4) is an estimate for the matrix condition number (for rational
> arithmetic, the condition number doesn't matter -- thus the second
> member of (%o3) is false):
>
> (%i4) linsolve_by_lu(m,b,'floatfield);
> (%o4)
> [matrix([1.011538461538462],[-0.0096153846153846],[0.0019230769230769]),12628.03416666667]
>
>
> Same as (%i4), but use big floats:
>
> (%i5) linsolve_by_lu(m,b,'bigfloatfield),fpprec : 28;
> (%o5)
> [matrix([1.011538461538461538461538462b0],[-9.615384615384615384615384627
> b-3],[1.923076923076923076923076923b-3]),12628.03416666667]
>
> For other options, do ? lu_factor.  If somebody would like to document the
> function
> 'linsovle_by_lu,' go ahead and do so (please---so much has changed in the
> way we
> do documentation, I'm not sure I know how to do it. Another thing: right
> now I can't test
> changes to documentation either ).


More information about the Maxima mailing list