rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

Some problems with featurep/complex #1741

Open rtoy opened 2 months ago

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-05 06:46:08 Created by macrakis on 2003-07-07 22:26:54 Original: https://sourceforge.net/p/maxima/bugs/341


declare(rrr,real) declare(zzz,complex)

featurep(x,real) => false (!!) With domain=real, should be true.

featurep(%i,imaginary) => 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)=>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.

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-05 06:46:09 Created by robert_dodier on 2006-07-07 14:08:51 Original: https://sourceforge.net/p/maxima/bugs/341/#eb68