> 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(fourd);
> 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,[])));
9989 additions=9990 terms
> grcalc(RR12):
> codegen[cost](numer(grcomponent(RR12,[])));
13279 additions=13280 terms
>