Am Freitag, den 29.04.2011, 13:27 -0500 schrieb Barton Willis:
> maxima-bounces at math.utexas.edu wrote on 04/29/2011 10:35:18 AM:
>
> > The taylor-ness of the expression was apparently thrown away
> > when it was the argument of some other operator.
>
> The same happens for CRE arguments:
>
> (%i8) foo(rat(x));
> (%o8) foo(x)
>
> (%i9) ?print(%);
> (($FOO SIMP) $X)
> (%o9) foo(x)
>
> I don't know what hunk of code does this.
>
> Simplifying functions that use the services of simpcheck instead of
> simplifya
> also squash CRE and taylor polynomial arguments.
>
> Some functions (trig simplification functions, for example), call
> taylorize to handle taylor arguments. I'd guess that the testsuite
> calls taylorize many many times--I hope it's fast---if it's not,
> blame me :(
It is the function simpargs which removes the CRE-form. This is a trace
of meval, simplifya and simpargs:
(%i3) foo(rat(x));
0: (MEVAL (($FOO) (($RAT) $X)))
1: (MEVAL (($RAT) $X))
2: (MEVAL $X)
3: (SIMPLIFYA $X NIL)
3: SIMPLIFYA returned $X
2: MEVAL returned $X
2: (SIMPLIFYA ((MRAT SIMP ($X) (#:X912)) (#:X912 1 1) . 1) NIL)
2: SIMPLIFYA returned ((MRAT SIMP ($X) (#:X912)) (#:X912 1 1) . 1)
1: MEVAL returned ((MRAT SIMP ($X) (#:X912)) (#:X912 1 1) . 1)
1: (SIMPLIFYA (($FOO) ((MRAT SIMP ($X) (#:X912)) (#:X912 1 1) . 1))
NIL)
2: (SIMPARGS (($FOO) ((MRAT SIMP ($X) (#:X912)) (#:X912 1 1) . 1))
NIL)
3: (SIMPLIFYA $X NIL)
3: SIMPLIFYA returned $X
2: SIMPARGS returned (($FOO SIMP) $X)
1: SIMPLIFYA returned (($FOO SIMP) $X)
0: MEVAL returned (($FOO SIMP) $X)
(%o3) foo(x)
In simpargs the argument is replaced with return value of simpcheck. But
in general this is not the correct way to use simpcheck.
By the way, this behavior is as old as Maxima and observable with Maxima
5.9.
Dieter Kaiser