askinteger((1+%i)*(1-%i)) => false (!!)
askinteger(exp(%i*%pi*i1)) => false (!!)
askinteger(%pi^(sin(x)^2+cos(x)^2-1) => false (!!)
The problem is that askinteger assumes that if the
expression *syntactically* includes %pi or %i (why not %
e, %gamma, ...?), then it cannot be integral.
Fix is simple: remove the special case. Of course, there
is room to be cleverer here if someone wants to go to
the trouble, but I'd think that it would be more important
to start with cases like sqrt(2), which currently doesn't
(cond ((or (not (free x '$%pi))
(not (free x '$%i))
(cond ((ratnump x) '$no)
Log in to post a comment.