> As for checking consp etc. before using mop, just about all of Maxima assumes that expressions are well-formed. I suppose in this case, in checking for equality in the test suite, you can't >make that assumption. But in that case, you should probably throw an error rather than ignore malformed expressions... and also check for more kinds of malformation.
I'll consider removing some of the consp tests from approx-alike.
> Other clauses are questionable, too. Why do you consider rat(x,x,y) and rat(x,y,x) approximately alike? Or taylor(x,x,0,5) and taylor(x,x,0,10)?
As I recall, my idea was that approx-alike(p,q) should be identical to is(p=q), except that approx-alike(p,q) would allow some slack in compassion of floats; for example,
(%i12) is(taylor(x,x,0,6)=taylor(x,x,%pi, 1));
(%o12) true
(%i13) is(rat(x,y)=x);
(%o13) true
This was maybe an OK choice, but I think that it would be interesting to experiment with a less permissive testing function.
Likely, I do not know enough about the structure of mrat expressions to do this. Volunteers?
One issue: To test, for example, taylor(exp(x),x,0,3) = 1+x+x^2/2+x^3/6+..., what's the expected output? The test could be
taylor(exp(x),x,0,3);
''(taylor(1+x+x^2/2+x^3/6,x,0,3))$
but maybe I thought that was too tedious.
--Barton (who wrote approx-alike some years ago)