mnewton



Agreed --- I think complex-number-p is broken:


(%i1) load("newton.mac")$
(%i2) 
newton([x^2 + y^2 + 11/3, y + x - 1],[x,y],[1.0 - %i,10.0], tol = 
1.0b-10);
(%o2) [x=1.443375672974064b0*%i+5.0b-1,y=5.0b-1-1.443375672974064b0*%i]

(%i3) load("C:/maximacvs/src/ellipt.lisp")$
(%i4) 
newton([x^2 + y^2 + 11/3, y + x - 1],[x,y],[1.0 - %i,10.0], tol = 
1.0b-10);
Unable to convert matrix entry to a big float
Singular jacobian matrix
#0: newton(eqs=[y^2+x^2+11/3,y+x-1],vars=[x,y],xo=[1.0-%i,10.0],args=[tol 
= 1.0b-10])(newton.mac line 50)
 -- an error.  To debug this try debugmode(true);
(%i5) :lisp(trace complex-number-p);
(COMPLEX-NUMBER-P)
(%i5) newton([x^2 + y^2 + 11/3, y + x - 1],[x,y],[1.0 - %i,10.0], tol = 
1.0b-10);
  1> (COMPLEX-NUMBER-P
         ((MPLUS SIMP) ((BIGFLOAT SIMP 56) -36028797018963968 2)
          ((MTIMES SIMP) ((BIGFLOAT SIMP 56) 36028797018963968 2) $%I))
         $BFLOATP)
  <1 (COMPLEX-NUMBER-P NIL)
Unable to convert matrix entry to a big float


I think complex-number-p should have returned true.

Barton

maxima-bounces at math.utexas.edu wrote on 07/17/2007 11:53:53 AM:

> On 7/17/07, Andrej Vodopivec <andrej.vodopivec at gmail.com> wrote:
> > > When tol is a big float, use bfloatfield:
> > >
> > > (%o2) [x=1.443375672974064*%i+0.5,y=0.5-1.443375672974064*%i]
> > > (%i3) newton([x^2 + y^2 + 11/3 = 0, y + x = 1],[x,y],[1.0 - %i,
> 10.0], tol =
> > > 1.0b-42), fpprec
> > >   : 50;
> > > (%o3)
> > > [x=1.4433756729740644112728719512548936391190043781753b0*%i+5.
> 0b-1,y=5.0b-1-
> > >
> > > 1.4433756729740644112728719512548936391190043781753b0*%i]
> >
> > The cvs version of linearalgebra does not allow complex numbers with
> > bigfloat components when the field is bigfloatfield.
> 
> I think this is because complex-number-p in ellipt.lisp was changed -
> it now does not recognize complex numbers with bigfloat components.
> 
> -- 
> Andrej
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima