The factor function is a little bit silly.



On Tue, Apr 8, 2008 at 10:03 AM, Richard Fateman
<fateman at cs.berkeley.edu> wrote:
>  Ordinarily, the first thing that factor() does is convert its argument to canonical rational form, which, among other things, expands it.

That's not quite true.  Regardless of savefactors, if the argument is
a product or power, factor only factors the parts, which leads to the
bugs:

     factor((1+sqrt(x))*(1-sqrt(x))) => -(sqrt(x)-1)*(sqrt(x)+1)
        (should be (1-x))
      factor((1-%i)*(1+%i)) => -(%i-1)*(%i+1)
        (should be 2)

By the way, in some quick tests, I couldn't get factor to actually use
saved factors -- can someone construct a case where heurtrial actually
gets called?

         -s