Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#118 pade produces an error when taylor expr is freeof variable

closed
nobody
5
2007-12-26
2002-09-05
Raymond Toy
No

The second example given in the documentation for pade
doesn't work. With clisp, cmucl,and gcl, it produces
an error that 134217728 is not a list.

Discussion

  • Robert Dodier
    Robert Dodier
    2005-02-27

    Logged In: YES
    user_id=501686

    The problem with the example in the documentation seems to
    stem from this: the polynomial (1st argument) in taylor is
    written in terms of X (majuscule), but the variable (2nd
    argument) is said to be x (minuscule).

    Here is a simpler example that shows the same behavior:

    (%i1) t: taylor (1 + X, x, 0, 1);

    (%o1)/T/ X + 1 + . . .
    (%i2) pade (t, 1, 1);

    Maxima encountered a Lisp error:

    Type-error in KERNEL::OBJECT-NOT-LIST-ERROR-HANDLER: 1 is
    not of type LIST

    Now redo this example, but with the variable declared
    appropriately in taylor:

    (%i3) t: taylor (1 + X, X, 0, 1);

    (%o3)/T/ 1 + X + . . .
    (%i4) pade (t, 1, 1);

    1
    (%o4) [- -----, X + 1]
    X - 1

    Replacing "x" by "X" in the example so that it reads "ff:
    taylor (<stuff>, X, 0, 10);" makes the calls to pade succeed.

    This behavior is a bug of some kind, although I don't know
    if it's a bug in pade or somewhere else.

    I have fixed the example in doc/info/Series.texi so that it
    succeeds.

    Maxima version: 5.9.1.1cvs
    Maxima build date: 11:16 2/26/2005
    host type: i686-redhat-linux-gnu
    lisp-implementation-type: CLISP
    lisp-implementation-version: 2.31 (released 2003-09-01)

    Same behavior:

    Maxima version: 5.9.1
    Maxima build date: 21:24 9/23/2004
    host type: i686-pc-linux-gnu
    lisp-implementation-type: CMU Common Lisp
    lisp-implementation-version: 19a

     
  • Robert Dodier
    Robert Dodier
    2006-06-26

    • labels: --> 460522
    • summary: pade produces an error --> pade produces an error when taylor expr is freeof variable
     
  • Robert Dodier
    Robert Dodier
    2006-09-09

    • labels: 460522 --> Lisp Core - Taylor
     
  • Dan Gildea
    Dan Gildea
    2007-12-26

    Logged In: YES
    user_id=1797506
    Originator: NO

    Fixed in pade.lisp rev 1.7 - extend $pade to handle case where input
    is constant w.r.t. taylor var.

    (%i1) t: taylor(1+a, x, 0, 1);
    (%o1)/T/ a + 1 + . . .
    (%i2) pade(t, 1, 1);
    (%o2) [a + 1]

     
  • Dan Gildea
    Dan Gildea
    2007-12-26

    • status: open --> closed