Menu

#5091 spectral_rep prints raw Lisp debug output when the spectrum cannot be found

None
open
5
1 day ago
2026-08-21
No
(%i1) display2d:false$
(%i2) load(linearalgebra)$
(%i3) spectral_rep(matrix([0,0,0,0,1],[1,0,0,0,1],[0,1,0,0,0],[0,0,1,0,0],
                          [0,0,0,1,0]));

(RATVARS = ((MLIST SIMP)) GCD = '$GCD ALGEBRAIC = T)
(RATFAC = NIL) Unable to find the spectrum
 -- an error. To debug this try: debugmode(true);

Only the "Unable to find the spectrum" error should reach the user. Instead two lines of raw Lisp are printed first, with internal uppercase symbols, a dollar-sign prefix, and an empty Maxima list shown as ((MLIST SIMP)) rather than []. These cannot be switched off. The GCD field is also wrong on its own terms: it prints the literal symbol '$GCD where its neighbours print values, whereas gcd is bound to spmod at that point. matrixexp on the same matrix produces the identical output, since it goes through spectral_rep.

Detected by Claude.

Discussion

  • Barton Willis

    Barton Willis - 1 day ago
    • Description has changed:

    Diff:

    
    
    • assigned_to: Barton Willis
    • Group: --> None
    • Priority: --> 5
     
  • Barton Willis

    Barton Willis - 1 day ago

    I'll fix this.

     

Log in to post a comment.