rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

Specvar ans in schatc #2101

Closed rtoy closed 4 months ago

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-05 18:39:15 Created by rtoy on 2023-01-26 04:25:48 Original: https://sourceforge.net/p/maxima/bugs/4089


The file schatc.lisp has a declare-top for the variable ans to declare it special at the beginning of the file. It's also declared unspecial at the end.

This makes it seem as if it's only used within this file. However, renaming ans t o*schatc-ans* in this file causes many tests for power series to fail with an error message that *schatc-ans* is unbound. So clearly something that schatc.lisp calls is expecting ans to be special, or, conversely, so caller of schatc.lisp expects setting ans to have an effect on schatc.lisp.

Since ans is such a common variable name, it's really hard to know where it's really supposed to be the specvar or is just a simple lexical var. Yuck.

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-05 18:39:16 Created by rtoy on 2023-01-26 15:11:25 Original: https://sourceforge.net/p/maxima/bugs/4089/#c29a


The bracnch rtoy-schatc-rename-specvar-ans has a working rename. It appears that series.lisp and trgred.lisp have to rename ans too.

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-05 18:39:20 Created by rtoy on 2023-01-27 19:14:56 Original: https://sourceforge.net/p/maxima/bugs/4089/#d441