4.2.0
We introduce Form 4.2.0, a new minor release. We have made more than 360 revisions,
including more than 50 bugfixes, and the introduction of more than 20 new features.
Three highlights of the new features are id all
, Format O4
, and Polyratfun expand
.
id all
The statement id all
generates all matches instead of just the first:
CF v,f,s;
L F = v(1,2,3,4);
id all v(?a,?b) = f(?a)*s(?b);
Print +s;
.end
F =
+ f*s(1,2,3,4)
+ f(1)*s(2,3,4)
+ f(1,2)*s(3,4)
+ f(1,2,3)*s(4)
+ f(1,2,3,4)*s
;
This statement is useful, for example, to generate automorphisms of graphs.
Format O4
Format O4 is a new output mode for polynomials. It uses local search methods
to reduce the number of operations in the polynomial. Generally it produces
better results and is faster than O3.
For example:
S a,b,c,d,e,f,g,h,i,j,k,l,m,n;
L G = (4*a^4+b+c+d + i^4 + g*n^3)^10 +
(a*h + e + f*i*j + g + h)^8 + (i + j + k + l + m + n)^12;
Format O4,saIter=300; * use 300 iterations for optimization
.sort
#optimize G
#write "Optimized with Horner scheme: `optimscheme_'"
#write "Number of operations in output: `optimvalue_'"
#clearoptimize
.end
Optimized with Horner scheme: h,a,f,j,d,c,b,i,e,m,g,k,l,n
Number of operations in output: 1937
Polyratfun expand
The Polyratfun
, which is used for rational coefficients, now supports
expansion. For example:
S ep;
CF rat;
Polyratfun rat;
L F = rat(1+ep,ep^2 + 3*ep + 1);
Print +s;
.sort
Polyratfun rat(expand,ep,5);
Print +s;
.end
produces
F = + rat(ep + 1,ep^2 + 3*ep + 1)
....
F = + rat(1 - 2*ep + 5*ep^2 - 13*ep^3 + 34*ep^4 - 89*ep^5)
For a complete overview of changes, see the full release notes.