more about sign, CLEARSIGN, *LOCAL-SIGNS*



On 2013-09-14, Stavros Macrakis <macrakis at alum.mit.edu> wrote:

> On Tue, Sep 10, 2013 at 2:59 PM, Robert Dodier <robert.dodier at gmail.com>wrote:

>> It turns out that the code to modify *LOCAL-SIGNS* in SIGN-MEXPT is very
>> old -- it is present in Maxima 5.0 source code. I suppose that it is
>> intended to cache intermediate results -- perhaps only for efficiency?
>> or are there simplifications which rely on it? Any further info on
>> this point?
>
> I suspect it is for more than just efficiency.  When the code encounters
> an expression like x^y, it infers that x#0.  That inference may simplify
> some further calculation, though I can't cite an example.  But that seems
> fishy to me anyway.

Well, for the record, I've nuked the calls to TDZERO, etc in SIGN-MEXPT,
so it no longer modifies *LOCAL-SIGNS*. That doesn't cause any test
suite failures for Clisp, GCL, SBCL, Clozure CL, or ECL, and it fixes
the misbehavior observed recently. As you note, it is plausible that
some simplifications expect SIGN-MEXPT to modify *LOCAL-SIGNS*, but I
haven't found any evidence of that.

best

Robert Dodier