> restart:
> grtw();
>
with(codegen,cost):
First note how cost counts:
> C:=x+y;
> codegen[cost](C);
> C1:=x+y+z;
> codegen[cost](C1);
> interface(labelling=false):
>
> qload(twodg1);
> grOptionDefaultSimp:=0:
> grdef(`RR11:=g{^c ^d}*R{c $x1 $x1 d}`):
Created definition for RR11
> grdef(`RR12:=g{^c ^d}*R{c $x1 $x2 d}`):
Created definition for RR12
> grcalc(RR11):
> codegen[cost](numer(grcomponent(RR11,[])));
16 additions=17 terms
> grcalc(RR12):
> codegen[cost](numer(grcomponent(RR12,[])));
16 additions=17 terms
>