Menu

#4752 csign doesn't handle subscripted functions like li correctly

None
closed
nobody
5
2026-06-03
2026-06-03
No

OK for normal functions:

(%i1) declare(f, complex)$

(%i2) csign(f(x));
(%o2) complex

Wrong for subscripted functions like li:

(%i1) featurep(li, complex);
(%o1) true

(%i2) csign(li[n](x));
(%o2) pnz

Caused by this code in sign-any (compar.lisp) not handling subscripted functions correctly:

        ((and *complexsign*
              (not (atom x))
              (decl-complexp (caar x)))
         ;; A function f(x), where f is declared to be imaginary or complex.
         (if ($featurep (caar x) '$imaginary)
             (setq sign '$imaginary)
             (setq sign '$complex)))

Discussion

  • David Scherfgen

    David Scherfgen - 2026-06-03
    • status: open --> closed
     
  • David Scherfgen

    David Scherfgen - 2026-06-03

    Fixed by commit [4c2ce8].

     

    Related

    Commit: [4c2ce8]


Log in to post a comment.