Form is really slow and fast for me. What could this mean?

Pearu Peterson pearu at cens.ioc.ee
Thu Mar 28 21:45:25 CET 2002


Hi,

I just discovered Form for myself. It is just too amazing how efficient
and powerful and yet so inefficient and limited this program is (if
misused in the late case, I guess).

Here follows another example of misusing the Form program. Just from the
curiosity I tried to evaluate q/q where q=(1+x+y+z)^20. Any (?) other CAS
would result in 1, but not the Form:

-------------------------------------------
FORM by J.Vermaseren,version 3.0(Oct 31 2001) Run at: Thu Mar 28 21:30:41
2002
    Symbols x,y,z;
    Local q=(1+x+y+z)^20;
    Local res=q/q;
    .end

Time =       0.06 sec    Generated terms =       1771
                q        Terms in output =       1771
                         Bytes used      =      31782
Sorted function argument too long.
Called from InFunction
----------------------------------------------

Using smaller exponent shows what is going on:
-----------------------------------------------
FORM by J.Vermaseren,version 3.0(Oct 31 2001) Run at: Thu Mar 28 21:35:35
2002
    Symbols x,y,z;
    Local q=(1+x+y+z);
    Local res=q/q;
    print;
    .end

Time =       0.00 sec    Generated terms =          4
                q        Terms in output =          4
                         Bytes used      =         54

Time =       0.00 sec    Generated terms =          4
              res        Terms in output =          4
                         Bytes used      =        122

   q =
      1 + x + y + z;

   res =
      1/(1 + x + y + z) + 1/(1 + x + y + z)*x + 1/(1 + x + y + z)*y + 1/(1
+ x + y + z)*z;
--------------------------------------------

Regards,
	Pearu




More information about the GiNaC-devel mailing list