[Maxima] Q: nounify symbols with a 'm prefix ?

Douglas Crosher dtc at scieneer.com
Thu Feb 15 22:54:47 CST 2007

Robert Dodier wrote:
> On 2/15/07, Douglas Crosher <dtc at scieneer.com> wrote:
>>> Does the test against '($ |m| |M|) yield something sensible for
>>> case-sensitive Lisp?
>> Yes, such a test could be appropriate if this behavior is restored.
>> However adding a test for '|m| does break some existing code
>> related to 'abs.
> What code is that, by the way?

This change causes some test failures in rtest_abs.  For example:

(%i1) 'abs(1);
(%o1)                               abs(1)

Rather than:
(%i1) 'abs(1);
(%o1)                                  1

This is caused by code that expects %MABS rather than %ABS.

>> It does appear that other code has developed with this test
>> as-is so it may be best to just drop the test for 'M - this would
>> make the behavior consistent for the lower-case CL variants.
> I think there is known strangeness associated with abs.
> So at this point I think I'd rather fix the test so it works for everything
> but abs, and then make abs conform to that. I say this without
> investigating how much work is involved there.

Here are some examples, before then after the above change:

?print(nounify(op(abs(x)))) -> %MABS
?print(nounify(op(x ^ y)))  -> %MEXPT
?print(nounify(op(sin(x)))) -> %SIN

?print(nounify(op(abs(x)))) -> %ABS
?print(nounify(op(x ^ y)))  -> %EXPT
?print(nounify(op(sin(x)))) -> %SIN

It's not clear to me why the noun form of abs was chosen to be %MABS, or why
the MABS alias is used rather than just %ABS.  Perhaps this is just historical.

Can you think of any problems with the current behavior of nounify?  Perhaps
an issue relating to MEXPT, MPLUS, etc.

Douglas Crosher

More information about the Maxima mailing list