|
From: Robert D. <rob...@us...> - 2025-11-08 01:54:28
|
- **status**: open --> closed
- **Comment**:
Fixed by commit [ 6b7c453 ].
---
**[bugs:#4631] Lisp error in gentran with gentranlang = c (attempting symbol operation on non-symbol)**
**Status:** closed
**Group:** None
**Labels:** share packages gentran
**Created:** Thu Nov 06, 2025 06:04 AM UTC by Robert Dodier
**Last Updated:** Thu Nov 06, 2025 06:05 AM UTC
**Owner:** nobody
Followup to bug #4625. Trying the example originally shown there provokes a Lisp error -- SYMBOL-PLIST is being called on a non-symbol. The bit about "t0 undeclared variable" is just an advisory; it's not an error.
```
(%i1) load (gentran) $
(%i2) gentranlang:c $
(%i3) var:-((sqrt(m_piM^4+W^8*cost^2-W^8+4*P0^2*W^6)+((cost^2-1)*m_nuc^2+W^2*cost^2-W^2)*m_piM^4+sqrt(m_piM^2+P0^2)*(4*W^2*m_nuc*m_piM^2-4*W^2*m_nuc^3+4*W^4*m_nuc)+((2-2*cost^2)*m_nuc^4-4*W^2*cost^2*m_nuc^2-2*W^4*cost^2-2*W^4)*m_piM^2+(cost^2-1)*m_nuc^6+(W^2-W^2*cost^2)*m_nuc^4+(W^4-W^4*cost^2)*m_nuc^2+W^6*cost^2-W^6)/((cost^2-1)*m_piM^4+((2-2*cost^2)*m_nuc^2-2*W^2*cost^2-2*W^2)*m_piM^2+(cost^2-1)*m_nuc^4+(2*W^2-2*W^2*cost^2)*m_nuc^2+W^4*cost^2-W^4)) $
(%i4) gentran (eval (var));
gentran: t0 undeclared variable
debugger invoked on a TYPE-ERROR @B800C26BD7 in thread
#<THREAD tid=32336 "main thread" RUNNING {1001760003}>:
The value
(SETQ T0 (MINUS (PLUS # # # # # # # # #)))
is not of type
SYMBOL
when binding SYMBOL
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [MACSYMA-QUIT] Maxima top-level
1: [CONTINUE ] Ignore runtime option --eval "(cl-user::run)".
2: [ABORT ] Skip rest of --eval and --load options.
3: Skip to toplevel READ/EVAL/PRINT loop.
4: [EXIT ] Exit SBCL (calling #'EXIT, killing the process).
(SYMBOL-PLIST (SETQ T0 (MINUS (PLUS (EXPT (PLUS # # # #) (QUOTIENT 1.0d0 2.0d0)) (TIMES (PLUS # # #) (EXPT |m_piM| 4.0d0)) (TIMES (EXPT # #) (PLUS # # #)) (TIMES (PLUS # # # #) (EXPT |m_piM| 2.0d0)) (TIMES (PLUS # -1) (EXPT M_NUC 6.0d0)) (TIMES (PLUS # #) (EXPT M_NUC 4.0d0)) (TIMES (PLUS # #) (EXPT M_NUC 2.0d0)) (TIMES (EXPT |w| 6.0d0) (EXPT COST 2.0d0)) (MINUS (EXPT |w| 6.0d0)))))) [external]
0]
```
I think the problem is that gentran has created a new assignment statement (to assign a partial result to the made-up variable `t0`) and appended it to the list of expressions to be returned, and there is one level of nested too many. E.g. putting `(list foo)` onto the return list instead of just `foo`, something like that. Not 100% sure.
---
Sent from sourceforge.net because max...@li... is subscribed to https://sourceforge.net/p/maxima/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/maxima/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |