Excellent! Thank you very much! This is exactly what I need.
My next step is to define the polynomial ring in the form:
R, (x,z) = PolynomialRing(ZZ, ["x","z"])
=> (Multivariate Polynomial Ring in x, z over Integer Ring, fmpz_mpoly[x, z])
So I only need to know the inderminates, probably via 'listOfTerms'.
Since FriCAS is strongly typed, the coefficient Ring will help for the
different algorithms to be used.
And after I just have to evaluate what I want via the Format1D.
Last step reevaluate in FriCAS the result. That's not computationally
expensive here.
I only plan, for Algebra, to implement expensive computation functions
in different packages.
That will use the FLINT 2 library via Julia if success is with me :)
As a matter of fact :
The arithmetic Fateman bench, here with nested Univariate Polynomials:
FriCAS
===================================================
(34) -> x : UP(x,INT)
(35) -> y : UP(y,UP(x,INT))
(36) -> z : UP(z,UP(y,UP(x,INT)))
(37) -> t : UP(t,UP(z,UP(y,UP(x,INT))))
(38) -> f := x + y + z + t + 1
(38) t + z + y + x + 1
(39) -> p := f^30;
(40) -> )set message time on
(40) -> q := p*(p+1);
Time: 0 (IN) + 148.97 (EV) + 0.00 (OT) = 148.97 sec
(41) -> q := p*(p+1);
Time: 0.00 (IN) + 151.28 (EV) + 0.00 (OT) = 151.29 sec
===================================================
FLINT 2 via the Nemo library in Julia
===================================================
julia> R, x = PolynomialRing(ZZ, "x");
julia> S, y = PolynomialRing(R, "y");
julia> T, z = PolynomialRing(S, "z");
julia> U, t = PolynomialRing(T, "t");
julia> f = x + y + z + t + 1
t + z + y + x + 1
julia> p = f^30;
julia> @time q = p*(p+1);
32.041742 seconds (8.72 M allocations: 337.483 MiB, 3.31% gc time,
0.02% compilation time)
julia> @time q = p*(p+1);
30.781938 seconds (5.67 M allocations: 277.926 MiB, 0.29% gc time)
> --
> You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
fricas-devel...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/02fab499-32ae-bd38-764f-1196817cdc02%40hemmecke.org.