Recent changes to 341: Some problems with featurep/complexhttp://sourceforge.net/p/maxima/bugs/341/2003-07-07T22:26:54ZSome problems with featurep/complex2003-07-07T22:26:54Z2003-07-07T22:26:54ZStavros Macrakishttp://sourceforge.net/u/macrakis/http://sourceforge.net949a90d6a5978f2e9c4e2de59bdf3051aa03b7b2declare\(rrr,real\)
declare\(zzz,complex\)
featurep\(x,real\) =&gt; false \(\!\!\)
With domain=real, should be true.
featurep\(%i,imaginary\) =&gt; false \(\!\!\)
Should be true.
featurep\(cabs\(zzz\),real\) unnecessarily asks whether
SQRT\(REALPART\(zzz\)^2+IMAGPART\(zzz\)^2\) is positive
or zero; similarly for sqrt\(abs\(x\)+abs\(y\)\).
Though featurep\(sqrt\(x\),real\) asks x pos/neg/z and
gives correct results, featurep\(sqrt\(x\),imaginary\) doesn't
ask the questions and returns false.
\---------------
Note that \(as best I understand its semantics\), featurep
\*correctly\* gives featurep\(rrr,complex\)=&gt;true, etc. I
believe that featurep is supposed to report whether the
range of values of an expression is a subset of the set
defined. Since rrr is real, and the reals are a subset of
the complexes, 3 is also complex.