#99 powerseries doesn't

closed
nobody
Lisp Core (471)
5
2005-02-03
2002-08-02
Raymond Toy
No

From a note from Harvey Stein, maxima doesn't even work
for this problem anymore:

(C1) powerseries(1/sqrt(1+x), x, 0);

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

Discussion

  • James Amundson

    James Amundson - 2002-08-03

    Logged In: YES
    user_id=28457

    I see the same behavior using Clisp and CMUCL, but the bug
    is not present using GCL. I tested using Linux.

     
  • Raymond Toy

    Raymond Toy - 2002-08-18

    Logged In: YES
    user_id=28849

    Consider this with gcl

    (defun foo (x) (caar x))
    (compile 'foo)
    (foo '(mexpt simp))

    which returns NIL, unlike CMUCL and Clisp.

    A possible fix is the following version of FREE (simp.lisp).
    It fixes the symptoms, but not necessarily the underlying
    problem.

    (DEFMFUN FREE (EXP VAR)
    (COND ((ALIKE1 EXP VAR) NIL)
    ((ATOM EXP) T)
    (T (AND (FREE (and (listp (car exp))
    (CAAR EXP)) VAR)
    (FREEL (CDR EXP) VAR)))))

     
  • Raymond Toy

    Raymond Toy - 2005-01-27

    Logged In: YES
    user_id=28849

    I think the fix for FREE is ok. There's also the same bug
    in SMONOGEN.
    Fixing these two functions is easy, but perhaps the right
    fix is to create a maxima-caar that returns nil if the arg
    is not a list? I'm not keen on replacing every use of caar
    with maxima-caar, though.

     
  • Raymond Toy

    Raymond Toy - 2005-01-27
    • labels: --> Lisp Core
     
  • Raymond Toy

    Raymond Toy - 2005-02-03
    • status: open --> closed
     
  • Raymond Toy

    Raymond Toy - 2005-02-03

    Logged In: YES
    user_id=28849

    This bug is fixed. Just added a check that (car x) is a
    list before calling (caar x).

    Also applied Barton's fix
    (http://www.math.utexas.edu/pipermail/maxima/2002/002472.html)
    to make maxima return the correct answer. (Without, the
    wrong answer is returned.)

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks