bug? ratinterpol generates 0^0 / pattern matching



You can fix it this way.

simp:false;
tellsimp(0^0,1);
simp:true;
.
.
.

Rich



From: Stavros Macrakis 
Sent: Tuesday, April 06, 2010 9:59 AM
To: andre maute 
Cc: maxima at math.utexas.edu 
Subject: Re: [Maxima] bug? ratinterpol generates 0^0 / pattern matching


Here is a simpler example (Maxima 5.20.1 GCL Windows)

load(interpol)$
ratinterpol([[1,1],[2,2]],1)   =>   x     --- OK

ratinterpol([[0,1],[2,2]],1);
 0
0  has been generated
#0: ratinterpol(tab=[[0,1],[2,2]],r=1,select=[])(interpol.mac line 324)
 -- an error. To debug this try: debugmode(true);

compare:

subst(0,k,ratinterpol([[k,1],[2,2]],1))   => x/2+1   --- OK

             -s


On Tue, Apr 6, 2010 at 08:19, andre maute <andre.maute at gmx.de> wrote:

  Hello Maxima Mailinglist,

  the following use of ratinterpol generates 0^0.
  Is this a bug or a feature?

  I have some hundred! similar ones!
  I only know that the expressions are rational functions that's all :-(

  Could this perhaps be done with pattern matching?

  Best Regards
  Andre Maute

  ------------------------------------------------------------------
  display2d : false;

  h00 : 1*(-1/((b3+1)*(2*b3-1)));
  h01 : 1*(-(4*b3+3)/((b3+2)*(2*b3-1)*(2*b3+3)));
  h02 : 1*(-6*(b3+1)*(2*b3+3)/((b3+2)*(2*b3-1)*(2*b3+5)^2));
  h03 : 1*(-2*(2*b3+3)*(4*b3+5)/((b3+3)*(2*b3-1)*(2*b3+5)*(2*b3+7)));
  h04 : 1*(-5*(2*b3+3)^2/((b3+3)*(2*b3-1)*(2*b3+7)*(2*b3+9)));
  h05 : 1*(-3*(2*b3+3)*(4*b3+7)/((b3+4)*(2*b3-1)*(2*b3+7)*(2*b3+11)));

  h0 :[
  [0,h00],
  [1,h01],
  [2,h02],
  [3,h03],
  [4,h04],
  [5,h05]
  ];

  load(interpol);
  ratinterpol(h0,1,varname='b2);
  -------------------------------------------------------------------
  ~$ maxima -b ratinterpol.max
  Maxima 5.19.1 http://maxima.sourceforge.net
  Using Lisp SBCL 1.0.18.debian
  Distributed under the GNU Public License. See the file COPYING.
  Dedicated to the memory of William Schelter.
  The function bug_report() provides bug reporting information.
  (%i1)                       batch(ratinterpol.max)

  batching /home/user/ratinterpol.max
  (%i2)                          display2d : false
  (%o2) false
  (%i3) h00:1*(-1)/((1+b3)*(2*b3-1))
  (%o3) -1/((b3+1)*(2*b3-1))
  (%i4) h01:1*(-(3+4*b3))/((2+b3)*(2*b3-1)*(3+2*b3))
  (%o4) (-4*b3-3)/((b3+2)*(2*b3-1)*(2*b3+3))
  (%i5) h02:1*(-6*(1+b3)*(3+2*b3))/((2+b3)*(2*b3-1)*(5+2*b3)^2)
  (%o5) -6*(b3+1)*(2*b3+3)/((b3+2)*(2*b3-1)*(2*b3+5)^2)
  (%i6) h03:1*(-2*(3+2*b3)*(5+4*b3))/((3+b3)*(2*b3-1)*(5+2*b3)*(7+2*b3))
  (%o6) -2*(2*b3+3)*(4*b3+5)/((b3+3)*(2*b3-1)*(2*b3+5)*(2*b3+7))
  (%i7) h04:1*(-5*(3+2*b3)^2)/((3+b3)*(2*b3-1)*(7+2*b3)*(9+2*b3))
  (%o7) -5*(2*b3+3)^2/((b3+3)*(2*b3-1)*(2*b3+7)*(2*b3+9))
  (%i8) h05:1*(-3*(3+2*b3)*(7+4*b3))/((4+b3)*(2*b3-1)*(7+2*b3)*(11+2*b3))
  (%o8) -3*(2*b3+3)*(4*b3+7)/((b3+4)*(2*b3-1)*(2*b3+7)*(2*b3+11))
  (%i9) h0:[[0,h00],[1,h01],[2,h02],[3,h03],[4,h04],[5,h05]]
  (%o9) [[0,-1/((b3+1)*(2*b3-1))],[1,(-4*b3-3)/((b3+2)*(2*b3-1)*(2*b3+3))],
        [2,-6*(b3+1)*(2*b3+3)/((b3+2)*(2*b3-1)*(2*b3+5)^2)],
        [3,-2*(2*b3+3)*(4*b3+5)/((b3+3)*(2*b3-1)*(2*b3+5)*(2*b3+7))],
        [4,-5*(2*b3+3)^2/((b3+3)*(2*b3-1)*(2*b3+7)*(2*b3+9))],
        [5,-3*(2*b3+3)*(4*b3+7)/((b3+4)*(2*b3-1)*(2*b3+7)*(2*b3+11))]]
  (%i10) load(interpol)
  (%o10) "/home/puck/opt/maxima/share/maxima/5.19.1/share/numeric/interpol.mac"
  (%i11) ratinterpol(h0,1,varname = 'b2)
  0^0 has been generated
  #0: ratinterpol(tab=[[0,-1/((b3+1)*(2*b3-1))],[1,
  (-4*b3-3)/((b3+2)*(2*b3-1)*(2*b3+3))],
  [2,-6*(b3+1)*(2*b3+3)/((b3+2)*(2*...,r=1,select=[varname = b2])(interpol.mac
  line 324)
   -- an error.  To debug this try debugmode(true);
  (%o11) "/home/user/ratinterpol.max"
  -------------------------------------------------------------------

  _______________________________________________
  Maxima mailing list
  Maxima at math.utexas.edu
  http://www.math.utexas.edu/mailman/listinfo/maxima





--------------------------------------------------------------------------------


_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima