Without assume(x > 0) (subject of a separate bug report), asksign(x*cos(y) - x) and variations yield incorrect results.
(%i1) asksign (x*cos(y) - x);
Is x positive, negative or zero?
p;
(%o1) pos
(%i2) asksign (x*(cos(y) - 1));
Is x positive, negative or zero?
p;
(%o2) pos
(%i3) asksign (x*(cos(y) - 1));
Is x positive, negative or zero?
n;
(%o3) neg
Those should be nz, nz, and pz, respectively, if I'm not mistaken.
Same behavior for sin(y).
I guess asksign is trying to be clever about the trig functions -- asksign(x*foo(y) - x) behaves differently (asking "Is x (foo(y) - 1) positive, negative or zero?" which isn't incorrect, although not too useful).
Imported from SourceForge on 2024-07-08 10:24:12 Created by robert_dodier on 2020-11-14 21:00:27 Original: https://sourceforge.net/p/maxima/bugs/3676
Without
assume(x > 0)
(subject of a separate bug report),asksign(x*cos(y) - x)
and variations yield incorrect results.Those should be
nz
,nz
, andpz
, respectively, if I'm not mistaken.Same behavior for
sin(y)
.I guess asksign is trying to be clever about the trig functions --
asksign(x*foo(y) - x)
behaves differently (asking "Is x (foo(y) - 1) positive, negative or zero?" which isn't incorrect, although not too useful).