is trigsign a good idea?



Would it be a good thing to do away with the 'trigsign' option
variable? Other than a tiny speed advantage, I can't think of any
reason for trigsign to be false. Consider:

(%i3) cos(x) - cos(-x), trigsign : false;
(%o3) cos(x)-cos(-x)  <--- Yikes! This is a trouble maker.

(%i4) cos(x) - cos(-x), trigsign : true;
(%o4) 0

Also, as we talked about some time ago, I think the following
behavior is goofy:

(%i5) assume(z < 0);
(%o5) [z<0]
(%i6) cos(z);
(%o6) cos(-z)

I propose to change the even-odd function simplification to
something (untested) like:

(setf (get '%cos 'even-functionp) t)
.. and etc for other functions

(defun even-odd-function-simp (op x)
  (cond ((and (get op 'odd-functionp) (if (great (neg x) x) (neg `((,op
  simp) ,(neg x))) `((,op simp) ,x))))
 ((and (get op 'even-functionp) (if (great (neg x) x) `((,op simp) ,(neg
 x)) `((,op simp) ,x))))
 (t nil)))

What do you all think about these two changes?

Barton