I have a function that manipulates some complicated expressions a maxima
script generates. In the function, I do several tests. Here's a
sample code that shows what I do:
fcn(xx) := block
(
if equal(xx, 0) then
print("equal shows that xx is zero")
else
print("equal doesn't show that xx is zero", xx),
if xx=0 then
print("xx=0 test is true." )
else
print("xx=0 test is false:", xx)
)$
fcn(a);
fcn(a-a);
which gives:
(%i2) fcn(a);
xx=0 test is false: a
(%o2) a
(%i3) fcn(a-a);
equal shows that xx is zero
xx=0 test is true.
(%o3) xx=0 test is true.
Notice that the 1st test doesn't give any answer (it does if I add an
assume(a>0)). Is this a syntax error on my part or is this a bug?