Performance - Maple Help

Performance Improvements in Maple 2024

Operations on Matrices Containing Quantities with Units

 • A new Units indexing function has been created which allows a matrix, vector, or array to keep units separate from the data.  This allows the data to be a single block of hardware type values, including datatype=float[8] and datatype=complex[8]. LinearAlgebra and other package routines can then dispatch to fast hardware algorithms providing optimal performance.
 • Here is an example that creates a 100x100 matrix of random data, each element has the unit of meters per second.  Computing the inverse takes milliseconds, which is over a thousand times faster than the way done in previous versions which required datatype=anything.
 > M := LinearAlgebra:-RandomMatrix(100,datatype=float[8],shape=Unit(m/s)):
 > CodeTools:-Usage( LinearAlgebra:-MatrixInverse(M) ):
 memory used=412.60KiB, alloc change=0 bytes, cpu time=18.00ms, real time=84.00ms, gc time=0ns
 • A matrix with the Units indexing function can be used seamlessly in place of a matrix that has no indexing function, but keeps quantities with units. Such a matrix allows a single unit for all data, different units on different entries, and even entries with no unit assigned.  The matrix will adapt to the situation.
 > M := Matrix( 2, (i,j)->(10*i+j)*Unit(kg), shape=Unit(kg) );
 ${M}{≔}\left[\begin{array}{cc}{11}{}⟦{\mathrm{kg}}⟧& {12}{}⟦{\mathrm{kg}}⟧\\ {21}{}⟦{\mathrm{kg}}⟧& {22}{}⟦{\mathrm{kg}}⟧\end{array}\right]$ (1)
 > M[1,1] := 1.23 * Unit(ohm);
 ${{M}}_{{1}{,}{1}}{≔}{1.23}{}⟦{\mathrm{\Omega }}⟧$ (2)
 > M[1,2] := 17;
 ${{M}}_{{1}{,}{2}}{≔}{17}$ (3)
 > M;
 $\left[\begin{array}{cc}{1.23}{}⟦{\mathrm{\Omega }}⟧& {17}\\ {21}{}⟦{\mathrm{kg}}⟧& {22}{}⟦{\mathrm{kg}}⟧\end{array}\right]$ (4)
 • Quantities assigned into the matrix will be converted into the default unit specified for that matrix whenever possible.
 > M[2,2] := 35.2 * Unit(lb);
 ${{M}}_{{2}{,}{2}}{≔}{35.2}{}⟦{\mathrm{lb}}⟧$ (5)
 > M;
 $\left[\begin{array}{cc}{1.23}{}⟦{\mathrm{\Omega }}⟧& {17}\\ {21}{}⟦{\mathrm{kg}}⟧& {15.96645142}{}⟦{\mathrm{kg}}⟧\end{array}\right]$ (6)
 • The unit and data can be easily separated, so algorithms can inspect and take advantage of the new structure as needed. In this example we perform a matrix power by operating on just the data, and only apply a unit transformation at the end.   This kind of manipulation is used behind the scenes in many built-in operations in the LinearAlgebra package.
 > A := Matrix(2,(i,j)->(10*i+j)*Unit(m), shape=Unit(m), datatype=float[8] );
 ${A}{≔}\left[\begin{array}{cc}{11.}{}⟦{m}⟧& {12.}{}⟦{m}⟧\\ {21.}{}⟦{m}⟧& {22.}{}⟦{m}⟧\end{array}\right]$ (7)
 > default_unit, data := op(rtable_split_unit(A));
 ${\mathrm{default_unit}}{,}{\mathrm{data}}{≔}⟦{m}⟧{,}\left[\begin{array}{cc}{11.}& {12.}\\ {21.}& {22.}\end{array}\right]$ (8)
 > newA := rtable_set_indfn(data^4,Units:-Simple:-simplify(default_unit^4));
 ${\mathrm{newA}}{≔}\left[\begin{array}{cc}{413557.}{}⟦{{m}}^{{4}}⟧& {439164.}{}⟦{{m}}^{{4}}⟧\\ {768537.}{}⟦{{m}}^{{4}}⟧& {816124.}{}⟦{{m}}^{{4}}⟧\end{array}\right]$ (9)
 • The Units:-Simple package makes use of this new data structure by default when possible.
 > with(Units:-Simple);
 $\left[{\mathrm{*}}{,}{\mathrm{+}}{,}{\mathrm{-}}{,}{\mathrm{/}}{,}{\mathrm{<}}{,}{\mathrm{<=}}{,}{\mathrm{<>}}{,}{\mathrm{=}}{,}{\mathrm{^}}{,}{\mathrm{arccos}}{,}{\mathrm{arccosh}}{,}{\mathrm{arccot}}{,}{\mathrm{arccoth}}{,}{\mathrm{arccsc}}{,}{\mathrm{arccsch}}{,}{\mathrm{arcsec}}{,}{\mathrm{arcsech}}{,}{\mathrm{arcsin}}{,}{\mathrm{arcsinh}}{,}{\mathrm{arctan}}{,}{\mathrm{arctanh}}{,}{\mathrm{argument}}{,}{\mathrm{collect}}{,}{\mathrm{combine}}{,}{\mathrm{cos}}{,}{\mathrm{cosh}}{,}{\mathrm{cot}}{,}{\mathrm{coth}}{,}{\mathrm{csc}}{,}{\mathrm{csch}}{,}{\mathrm{diff}}{,}{\mathrm{eval}}{,}{\mathrm{evalc}}{,}{\mathrm{evalr}}{,}{\mathrm{exp}}{,}{\mathrm{factor}}{,}{\mathrm{frem}}{,}{\mathrm{ln}}{,}{\mathrm{log}}{,}{\mathrm{log10}}{,}{\mathrm{log2}}{,}{\mathrm{max}}{,}{\mathrm{min}}{,}{\mathrm{piecewise}}{,}{\mathrm{polar}}{,}{\mathrm{root}}{,}{\mathrm{sec}}{,}{\mathrm{sech}}{,}{\mathrm{shake}}{,}{\mathrm{sin}}{,}{\mathrm{sinh}}{,}{\mathrm{sqrt}}{,}{\mathrm{surd}}{,}{\mathrm{tan}}{,}{\mathrm{tanh}}{,}{\mathrm{type}}{,}{\mathrm{verify}}\right]$ (10)
 > A := <1,2;3,4>*Unit(m);
 ${A}{≔}\left[\begin{array}{cc}⟦{m}⟧& {2}{}⟦{m}⟧\\ {3}{}⟦{m}⟧& {4}{}⟦{m}⟧\end{array}\right]$ (11)
 > B := <5,6;7,8>*Unit(s);
 ${B}{≔}\left[\begin{array}{cc}{5}{}⟦{s}⟧& {6}{}⟦{s}⟧\\ {7}{}⟦{s}⟧& {8}{}⟦{s}⟧\end{array}\right]$ (12)
 > C := A . B^(-1);
 ${C}{≔}\left[\begin{array}{cc}{3}{}⟦\frac{{m}}{{s}}⟧& {-}{2}{}⟦\frac{{m}}{{s}}⟧\\ {2}{}⟦\frac{{m}}{{s}}⟧& {-}⟦\frac{{m}}{{s}}⟧\end{array}\right]$ (13)
 > rtable_indfns(A);
 $⟦{m}⟧$ (14)
 > rtable_indfns(B);
 $⟦{s}⟧$ (15)
 > rtable_indfns(C);
 $⟦\frac{{m}}{{s}}⟧$ (16)
 • For additional improvements involving units in Maple 2024, see Improvements in Handling of Units in Maple 2024.

Floating-Point Matrix and Vector Initialization

 • Maple uses hardware double-precision floating-point representations when constructing matrices and vectors specified with datatype=float[8]. On initialization Maple 2024 calls directly to the evalhf implementation of known functions and avoids conversion from hardware to software floats. Performance of examples such as the following has dramatically sped up.
 > tt:=time[real]():
 > signal:=Vector(10^5,i->sin(i*1.0),datatype=float[8]):
 > time[real]()-tt;
 ${0.311}$ (17)

Faster Univariate Complex Solver

 • Maple 2024 contains a new solver for isolating and approximating all complex roots of a univariate polynomial with numeric or complex(numeric) coefficients. This solver is available through the method=PW option of the RootFinding:-Isolate command. Except when the domain option is given, the new solver is considerably faster than the one used when method=HR is specified, in particular for high accuracy, and it is now the default when option complex is used. Here are a few examples and timing comparisons for the two solvers.
 • Random polynomial, increasing accuracy.
 > f := randpoly(x, dense, coeffs=rand(-2^32+1..2^32-1), degree=512):
 > CodeTools:-Usage(RootFinding:-Isolate(f, digits=10, method=HR)): CodeTools:-Usage(RootFinding:-Isolate(f, digits=10, method=PW)):
 memory used=6.55MiB, alloc change=0 bytes, cpu time=161.00ms, real time=161.00ms, gc time=0ns
 memory used=5.18MiB, alloc change=0 bytes, cpu time=118.00ms, real time=117.00ms, gc time=0ns
 > CodeTools:-Usage(RootFinding:-Isolate(f, digits=15, method=HR)): CodeTools:-Usage(RootFinding:-Isolate(f, digits=15, method=PW)):
 memory used=6.58MiB, alloc change=0 bytes, cpu time=1.66s, real time=1.66s, gc time=0ns
 memory used=4.90MiB, alloc change=0 bytes, cpu time=271.00ms, real time=271.00ms, gc time=0ns
 > CodeTools:-Usage(RootFinding:-Isolate(f, digits=30, method=HR)): CodeTools:-Usage(RootFinding:-Isolate(f, digits=30, method=PW)):
 memory used=6.76MiB, alloc change=0 bytes, cpu time=1.73s, real time=1.73s, gc time=0ns
 memory used=5.58MiB, alloc change=0 bytes, cpu time=388.00ms, real time=388.00ms, gc time=0ns
 • Bernoulli polynomials, increasing degree.
 > g1 := expand(bernoulli(128,x)):
 > CodeTools:-Usage(RootFinding:-Isolate(g1, digits=10, method=HR)): CodeTools:-Usage(RootFinding:-Isolate(g1, digits=10, method=PW)):
 memory used=1.57MiB, alloc change=0 bytes, cpu time=7.24s, real time=7.24s, gc time=0ns
 memory used=1.35MiB, alloc change=0 bytes, cpu time=1.17s, real time=1.17s, gc time=0ns
 > g2 := expand(bernoulli(255,x)):
 > CodeTools:-Usage(RootFinding:-Isolate(g2, digits=10, method=HR)): CodeTools:-Usage(RootFinding:-Isolate(g2, digits=10, method=PW)):
 memory used=3.61MiB, alloc change=0 bytes, cpu time=37.04s, real time=37.04s, gc time=0ns
 memory used=2.94MiB, alloc change=0 bytes, cpu time=3.36s, real time=3.36s, gc time=0ns

RootFinding

 • The EvaluateAtRoot command in the RootFinding package has a new option avoidsymbolic. Its main purpose is to improve the command's efficiency. When specified, symbolic processing to ascertain whether the given root is an exact zero of a constraint or not will be skipped. In general this will lead to weaker answers, e.g., $\mathrm{FAIL}$ being returned instead of $\mathrm{true}$ or $\mathrm{false}$.
 • In the following example, the unique root of $\mathrm{sys}$ contained in $\mathrm{sysroot}$ is actually an exact root of the non-strict inequality in $\mathrm{cons}$.
 > vars := [x, y];
 ${\mathrm{vars}}{≔}\left[{x}{,}{y}\right]$ (18)
 > sys := [-7*x^5+22*x^4-55*x^3-94*x^2+87*x-56,         -10*y^5+62*y^4-82*y^3+80*y^2-44*y+71];
 ${\mathrm{sys}}{≔}\left[{-}{7}{}{{x}}^{{5}}{+}{22}{}{{x}}^{{4}}{-}{55}{}{{x}}^{{3}}{-}{94}{}{{x}}^{{2}}{+}{87}{}{x}{-}{56}{,}{-}{10}{}{{y}}^{{5}}{+}{62}{}{{y}}^{{4}}{-}{82}{}{{y}}^{{3}}{+}{80}{}{{y}}^{{2}}{-}{44}{}{y}{+}{71}\right]$ (19)
 > sysroot := [[-228940483906911495/144115188075855872, -57235120976727867/36028797018963968],             [338902091289333/70368744177664, 677804182578693/140737488355328]];
 ${\mathrm{sysroot}}{≔}\left[\left[{-}\frac{{228940483906911495}}{{144115188075855872}}{,}{-}\frac{{57235120976727867}}{{36028797018963968}}\right]{,}\left[\frac{{338902091289333}}{{70368744177664}}{,}\frac{{677804182578693}}{{140737488355328}}\right]\right]$ (20)
 > cons := [434*x^9-2043*x^8+6055*x^7-1085*x^6-10004*x^5+17167*x^4-6842*x^3+11542*x^2-6997*x <= -4648,          -50*y^5+23*y^4+75*y^3-92*y^2+6*y+74 > 0];
 ${\mathrm{cons}}{≔}\left[{434}{}{{x}}^{{9}}{-}{2043}{}{{x}}^{{8}}{+}{6055}{}{{x}}^{{7}}{-}{1085}{}{{x}}^{{6}}{-}{10004}{}{{x}}^{{5}}{+}{17167}{}{{x}}^{{4}}{-}{6842}{}{{x}}^{{3}}{+}{11542}{}{{x}}^{{2}}{-}{6997}{}{x}{\le }{-4648}{,}{0}{<}{-}{50}{}{{y}}^{{5}}{+}{23}{}{{y}}^{{4}}{+}{75}{}{{y}}^{{3}}{-}{92}{}{{y}}^{{2}}{+}{6}{}{y}{+}{74}\right]$ (21)
 > consSet := convert(cons, 'set');
 ${\mathrm{consSet}}{≔}\left\{{434}{}{{x}}^{{9}}{-}{2043}{}{{x}}^{{8}}{+}{6055}{}{{x}}^{{7}}{-}{1085}{}{{x}}^{{6}}{-}{10004}{}{{x}}^{{5}}{+}{17167}{}{{x}}^{{4}}{-}{6842}{}{{x}}^{{3}}{+}{11542}{}{{x}}^{{2}}{-}{6997}{}{x}{\le }{-4648}{,}{0}{<}{-}{50}{}{{y}}^{{5}}{+}{23}{}{{y}}^{{4}}{+}{75}{}{{y}}^{{3}}{-}{92}{}{{y}}^{{2}}{+}{6}{}{y}{+}{74}\right\}$ (22)
 • By default, EvaluateAtRoot uses symbolic computation to prove that the first constraint is satisfied:
 > CodeTools:-Usage(RootFinding:-EvaluateAtRoot(cons, sysroot, sys, vars));
 memory used=3.14MiB, alloc change=0 bytes, cpu time=33.00ms, real time=34.00ms, gc time=0ns
 $\left[{\mathrm{true}}{,}{\mathrm{false}}\right]$ (23)
 > CodeTools:-Usage(RootFinding:-EvaluateAtRoot(consSet, sysroot, sys, vars));
 memory used=446.16KiB, alloc change=0 bytes, cpu time=10.00ms, real time=10.00ms, gc time=0ns
 ${\mathrm{false}}$ (24)
 • When specifying the avoidsymbolic option and giving a maximum value of $100$ for the floating-point precision, the underlying numerical computation will not be able to prove that the first constraint is satisfied, and therefore $\mathrm{FAIL}$ is returned:
 > CodeTools:-Usage(RootFinding:-EvaluateAtRoot(cons, sysroot, sys, vars, 'avoidsymbolic' = true, 'threshold' = 100));
 memory used=143.38KiB, alloc change=0 bytes, cpu time=3.00ms, real time=3.00ms, gc time=0ns
 $\left[{\mathrm{FAIL}}{,}{\mathrm{false}}\right]$ (25)
 • Nevertheless, in the following calling sequence, where we are only interested in the truth value of the logical conjunction of the two constraints, this weaker result is still sufficient, since the 2nd constraint, and therefore the whole conjunction, is $\mathrm{false}$:
 > CodeTools:-Usage(RootFinding:-EvaluateAtRoot(consSet, sysroot, sys, vars, 'avoidsymbolic' = true, 'threshold' = 100));
 memory used=133.67KiB, alloc change=0 bytes, cpu time=3.00ms, real time=3.00ms, gc time=0ns
 ${\mathrm{false}}$ (26)

Quantifier Elimination

 • Significant performance improvements have been made to the QuantifierElimination package, including faster evaluation at sample points by using RootFinding:-EvaluateAtRoot and caching of intermediate results.
 • The following examples are 6-7 times faster than Maple 2023.
 > formula1 := forall([x,y,t], Implies(And(x^3+y^2-x=t, t^2=4/27, t<0), x^2+y^2>=rho));
 ${\mathrm{formula1}}{≔}{\forall }{}\left(\left[{x}{,}{y}{,}{t}\right]{,}{{x}}^{{3}}{+}{{y}}^{{2}}{-}{x}{=}{t}{\wedge }{{t}}^{{2}}{=}\frac{{4}}{{27}}{\wedge }{t}{<}{0}{⇒}{\mathrm{\rho }}{\le }{{x}}^{{2}}{+}{{y}}^{{2}}\right)$ (27)
 > CodeTools:-Usage(QuantifierElimination:-QuantifierEliminate(formula1));
 memory used=2.88GiB, alloc change=158.48MiB, cpu time=49.36s, real time=43.16s, gc time=8.52s
 ${\mathrm{\rho }}{-}{\mathrm{RootOf}}{}\left({729}{}{{\mathrm{_Z}}}^{{2}}{+}{270}{}{\mathrm{_Z}}{-}{83}{,}{-}\frac{{673038004593441041303}}{{1180591620717411303424}}{..}{-}\frac{{2692152018373764165185}}{{4722366482869645213696}}\right){<}{0}{\vee }{\mathrm{\rho }}{-}{\mathrm{RootOf}}{}\left({729}{}{{\mathrm{_Z}}}^{{2}}{+}{270}{}{\mathrm{_Z}}{-}{83}{,}{-}\frac{{673038004593441041303}}{{1180591620717411303424}}{..}{-}\frac{{2692152018373764165185}}{{4722366482869645213696}}\right){=}{0}{\vee }\left({\mathrm{RootOf}}{}\left({729}{}{{\mathrm{_Z}}}^{{2}}{+}{270}{}{\mathrm{_Z}}{-}{83}{,}{-}\frac{{673038004593441041303}}{{1180591620717411303424}}{..}{-}\frac{{2692152018373764165185}}{{4722366482869645213696}}\right){-}{\mathrm{\rho }}{<}{0}{\wedge }{\mathrm{\rho }}{-}{\mathrm{RootOf}}{}\left({27}{}{{\mathrm{_Z}}}^{{2}}{-}{18}{}{\mathrm{_Z}}{-}{13}{,}{-}\frac{{64411164140810191969}}{{147573952589676412928}}{..}{-}\frac{{1030578626252963071477}}{{2361183241434822606848}}\right){<}{0}\right){\vee }{\mathrm{\rho }}{-}{\mathrm{RootOf}}{}\left({27}{}{{\mathrm{_Z}}}^{{2}}{-}{18}{}{\mathrm{_Z}}{-}{13}{,}{-}\frac{{64411164140810191969}}{{147573952589676412928}}{..}{-}\frac{{1030578626252963071477}}{{2361183241434822606848}}\right){=}{0}{\vee }\left({\mathrm{RootOf}}{}\left({27}{}{{\mathrm{_Z}}}^{{2}}{-}{18}{}{\mathrm{_Z}}{-}{13}{,}{-}\frac{{64411164140810191969}}{{147573952589676412928}}{..}{-}\frac{{1030578626252963071477}}{{2361183241434822606848}}\right){-}{\mathrm{\rho }}{<}{0}{\wedge }{\mathrm{\rho }}{-}{\mathrm{RootOf}}{}\left({27}{}{{\mathrm{_Z}}}^{{2}}{-}{4}{,}{-}\frac{{1817639706731237273789}}{{4722366482869645213696}}{..}{-}\frac{{908819853365618636881}}{{2361183241434822606848}}\right){<}{0}\right){\vee }{\mathrm{\rho }}{-}{\mathrm{RootOf}}{}\left({27}{}{{\mathrm{_Z}}}^{{2}}{-}{4}{,}{-}\frac{{1817639706731237273789}}{{4722366482869645213696}}{..}{-}\frac{{908819853365618636881}}{{2361183241434822606848}}\right){=}{0}{\vee }\left({\mathrm{RootOf}}{}\left({27}{}{{\mathrm{_Z}}}^{{2}}{-}{4}{,}{-}\frac{{1817639706731237273789}}{{4722366482869645213696}}{..}{-}\frac{{908819853365618636881}}{{2361183241434822606848}}\right){-}{\mathrm{\rho }}{<}{0}{\wedge }{27}{}{\mathrm{\rho }}{<}{-5}\right){\vee }{27}{}{\mathrm{\rho }}{+}{5}{=}{0}{\vee }\left({-}{27}{}{\mathrm{\rho }}{<}{5}{\wedge }{\mathrm{\rho }}{-}{\mathrm{RootOf}}{}\left({27}{}{{\mathrm{_Z}}}^{{2}}{-}{18}{}{\mathrm{_Z}}{-}{1}{,}{-}\frac{{30439693221836108653}}{{590295810358705651712}}{..}{-}\frac{{121758772887344434585}}{{2361183241434822606848}}\right){<}{0}\right){\vee }{\mathrm{\rho }}{-}{\mathrm{RootOf}}{}\left({27}{}{{\mathrm{_Z}}}^{{2}}{-}{18}{}{\mathrm{_Z}}{-}{1}{,}{-}\frac{{30439693221836108653}}{{590295810358705651712}}{..}{-}\frac{{121758772887344434585}}{{2361183241434822606848}}\right){=}{0}{\vee }\left({\mathrm{RootOf}}{}\left({27}{}{{\mathrm{_Z}}}^{{2}}{-}{18}{}{\mathrm{_Z}}{-}{1}{,}{-}\frac{{30439693221836108653}}{{590295810358705651712}}{..}{-}\frac{{121758772887344434585}}{{2361183241434822606848}}\right){-}{\mathrm{\rho }}{<}{0}{\wedge }{\mathrm{\rho }}{<}{0}\right){\vee }{\mathrm{\rho }}{=}{0}{\vee }\left({-}{\mathrm{\rho }}{<}{0}{\wedge }{\mathrm{\rho }}{-}{\mathrm{RootOf}}{}\left({729}{}{{\mathrm{_Z}}}^{{2}}{+}{270}{}{\mathrm{_Z}}{-}{83}{,}\frac{{1886254790177420764705}}{{9444732965739290427392}}{..}\frac{{471563697544355191183}}{{2361183241434822606848}}\right){<}{0}\right){\vee }{\mathrm{\rho }}{-}{\mathrm{RootOf}}{}\left({729}{}{{\mathrm{_Z}}}^{{2}}{+}{270}{}{\mathrm{_Z}}{-}{83}{,}\frac{{1886254790177420764705}}{{9444732965739290427392}}{..}\frac{{471563697544355191183}}{{2361183241434822606848}}\right){=}{0}{\vee }\left({\mathrm{RootOf}}{}\left({729}{}{{\mathrm{_Z}}}^{{2}}{+}{270}{}{\mathrm{_Z}}{-}{83}{,}\frac{{1886254790177420764705}}{{9444732965739290427392}}{..}\frac{{471563697544355191183}}{{2361183241434822606848}}\right){-}{\mathrm{\rho }}{<}{0}{\wedge }{3}{}{\mathrm{\rho }}{<}{1}\right){\vee }{-}{1}{+}{3}{}{\mathrm{\rho }}{=}{0}$ (28)
 > formula2 := exists([t__10,t__11,t__12,t__6,b__12,t__5], And(     0<=t__10, 0<=t__11, 0<=t__12, 0<=t__6, 0<=b__12,     t__10<=1, t__11<=1, t__12<=1, t__6<=1, b__12<=1,     0
 ${\mathrm{formula2}}{≔}{\exists }{}\left(\left[\mathrm{t__10}{,}\mathrm{t__11}{,}\mathrm{t__12}{,}\mathrm{t__6}{,}\mathrm{b__12}{,}\mathrm{t__5}\right]{,}{0}{\le }\mathrm{t__10}{\wedge }{0}{\le }\mathrm{t__11}{\wedge }{0}{\le }\mathrm{t__12}{\wedge }{0}{\le }\mathrm{t__6}{\wedge }{0}{\le }\mathrm{b__12}{\wedge }\mathrm{t__10}{\le }{1}{\wedge }\mathrm{t__11}{\le }{1}{\wedge }\mathrm{t__12}{\le }{1}{\wedge }\mathrm{t__6}{\le }{1}{\wedge }\mathrm{b__12}{\le }{1}{\wedge }{0}{<}\mathrm{t__5}{\wedge }\mathrm{t__5}{<}{1}{\wedge }{\mathrm{t__5}}^{{3}}{-}{2}{}{\mathrm{t__5}}^{{2}}{+}\mathrm{t__5}{<}{0}{\wedge }{0}{<}{\mathrm{t__5}}^{{3}}{-}{2}{}{\mathrm{t__5}}^{{2}}{+}\mathrm{t__5}{+}{1}{\wedge }\mathrm{t__6}{+}{1}{-}\mathrm{t__5}{=}{0}{\wedge }{-}{\mathrm{t__5}}^{{2}}{+}\mathrm{t__10}{+}\mathrm{t__5}{=}{0}{\wedge }{\mathrm{t__5}}^{{2}}{-}\mathrm{t__11}{+}\mathrm{t__12}{-}{2}{}\mathrm{t__5}{+}{1}{=}{0}{\wedge }{-}{\mathrm{t__5}}^{{2}}{+}\mathrm{b__12}{+}\mathrm{t__11}{+}{2}{}\mathrm{t__5}{-}{2}{=}{0}\right)$ (29)
 > CodeTools:-Usage(QuantifierElimination:-QuantifierEliminate(formula2));
 memory used=2.56GiB, alloc change=0 bytes, cpu time=39.67s, real time=34.16s, gc time=7.40s
 ${\mathrm{false}}$ (30)
 • In addition, the display of various data structures in the QuantifierElimination package has been improved.
 > formula := exists(x, x^2+b*x+c=0);
 ${\mathrm{formula}}{≔}{\exists }{}\left({x}{,}{b}{}{x}{+}{{x}}^{{2}}{+}{c}{=}{0}\right)$ (31)
 > C := QuantifierElimination:-PartialCylindricalAlgebraicDecompose(formula, 'output'=['data']);
 ${C}{≔}\left[\begin{array}{lll}{\mathrm{Variables}}& {=}& {}\left[{c}{,}{b}{,}{x}\right]\\ {\mathrm{Input Formula}}& {=}& {}{\exists }{}\left({x}{,}{b}{}{x}{+}{{x}}^{{2}}{+}{c}{=}{0}\right)\\ {\mathrm{# Cells}}& {=}& {}{17}\\ {\mathrm{Projection polynomials for level 1}}& {=}& {}\left[\begin{array}{c}{c}\end{array}\right]\\ {\mathrm{Projection polynomials for level 2}}& {=}& {}\left[\begin{array}{c}{{b}}^{{2}}{-}{4}{}{c}\end{array}\right]\\ {\mathrm{Projection polynomials for level 3}}& {=}& {}\left[\begin{array}{c}{b}{}{x}{+}{{x}}^{{2}}{+}{c}\end{array}\right]\end{array}\right$ (32)
 > GetLeafCells(C)[1..5];
 $\left[\left[\begin{array}{lll}{\mathrm{Description}}& {=}& {}{c}{<}{0}{\wedge }{x}{<}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{b}{}{\mathrm{_Z}}{+}{c}{,}{\mathrm{index}}{=}{{\mathrm{real}}}_{{1}}\right)\\ {\mathrm{Sample Point}}& {=}& {}\left[{c}{=}{-1}{,}{b}{=}{0}{,}{x}{=}{-2}\right]\\ {\mathrm{Index}}& {=}& {}\left[{1}{,}{1}{,}{1}\right]\end{array}\right{,}\left[\begin{array}{lll}{\mathrm{Description}}& {=}& {}{c}{<}{0}{\wedge }{x}{=}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{b}{}{\mathrm{_Z}}{+}{c}{,}{\mathrm{index}}{=}{{\mathrm{real}}}_{{1}}\right)\\ {\mathrm{Sample Point}}& {=}& {}\left[{c}{=}{-1}{,}{b}{=}{0}{,}{x}{=}{-1}\right]\\ {\mathrm{Index}}& {=}& {}\left[{1}{,}{1}{,}{2}\right]\end{array}\right{,}\left[\begin{array}{lll}{\mathrm{Description}}& {=}& {}{c}{=}{0}{\wedge }{b}{<}{0}{\wedge }{x}{<}{\mathrm{RootOf}}{}\left({\mathrm{_Z}}{}\left({\mathrm{_Z}}{+}{b}\right){,}{\mathrm{index}}{=}{{\mathrm{real}}}_{{1}}\right)\\ {\mathrm{Sample Point}}& {=}& {}\left[{c}{=}{0}{,}{b}{=}{-1}{,}{x}{=}{-1}\right]\\ {\mathrm{Index}}& {=}& {}\left[{2}{,}{1}{,}{1}\right]\end{array}\right{,}\left[\begin{array}{lll}{\mathrm{Description}}& {=}& {}{c}{=}{0}{\wedge }{b}{<}{0}{\wedge }{x}{=}{\mathrm{RootOf}}{}\left({\mathrm{_Z}}{}\left({\mathrm{_Z}}{+}{b}\right){,}{\mathrm{index}}{=}{{\mathrm{real}}}_{{1}}\right)\\ {\mathrm{Sample Point}}& {=}& {}\left[{c}{=}{0}{,}{b}{=}{-1}{,}{x}{=}{0}\right]\\ {\mathrm{Index}}& {=}& {}\left[{2}{,}{1}{,}{2}\right]\end{array}\right{,}\left[\begin{array}{lll}{\mathrm{Description}}& {=}& {}{c}{=}{0}{\wedge }{b}{=}{0}{\wedge }{x}{<}{0}\\ {\mathrm{Sample Point}}& {=}& {}\left[{c}{=}{0}{,}{b}{=}{0}{,}{x}{=}{-1}\right]\\ {\mathrm{Index}}& {=}& {}\left[{2}{,}{2}{,}{1}\right]\end{array}\right\right]$ (33)
 • The new GetCells method, which supersedes GetLeafCells, also has additional options to control the output.
 > r := GetCells(C, output=[samplepoints,descriptions]):
 > r[1][1..5];
 $\left[\left[{c}{=}{-1}{,}{b}{=}{0}{,}{x}{=}{-2}\right]{,}\left[{c}{=}{-1}{,}{b}{=}{0}{,}{x}{=}{-1}\right]{,}\left[{c}{=}{0}{,}{b}{=}{-1}{,}{x}{=}{-1}\right]{,}\left[{c}{=}{0}{,}{b}{=}{-1}{,}{x}{=}{0}\right]{,}\left[{c}{=}{0}{,}{b}{=}{0}{,}{x}{=}{-1}\right]\right]$ (34)
 > r[2][1..5];
 $\left[{c}{<}{0}{\wedge }{x}{<}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{b}{}{\mathrm{_Z}}{+}{c}{,}{\mathrm{index}}{=}{{\mathrm{real}}}_{{1}}\right){,}{c}{<}{0}{\wedge }{x}{=}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{2}}{+}{b}{}{\mathrm{_Z}}{+}{c}{,}{\mathrm{index}}{=}{{\mathrm{real}}}_{{1}}\right){,}{c}{=}{0}{\wedge }{b}{<}{0}{\wedge }{x}{<}{\mathrm{RootOf}}{}\left({\mathrm{_Z}}{}\left({\mathrm{_Z}}{+}{b}\right){,}{\mathrm{index}}{=}{{\mathrm{real}}}_{{1}}\right){,}{c}{=}{0}{\wedge }{b}{<}{0}{\wedge }{x}{=}{\mathrm{RootOf}}{}\left({\mathrm{_Z}}{}\left({\mathrm{_Z}}{+}{b}\right){,}{\mathrm{index}}{=}{{\mathrm{real}}}_{{1}}\right){,}{c}{=}{0}{\wedge }{b}{=}{0}{\wedge }{x}{<}{0}\right]$ (35)

Various Small Improvements

 • The ceil, floor, and round functions are 1.5-2x faster for some numeric arguments in Maple 2024.
 > CodeTools:-Usage([seq(round(n), n=1..10^5)]):
 memory used=85.45MiB, alloc change=0 bytes, cpu time=217.00ms, real time=218.00ms, gc time=0ns
 > CodeTools:-Usage([seq(floor(n/13), n=1..10^5)]):
 memory used=191.96MiB, alloc change=0 bytes, cpu time=2.00s, real time=1.25s, gc time=1.05s
 • The evalhf command uses a more accurate formula for computing the tangent, cotangent, hyperbolic tangent, and hyperbolic cotangent function in certain areas of the complex plane. As a consequence, evalhf is now used for computing these functions numerically in those parts of the complex plane whenever the requested precision is suitable for hardware float computation. This speeds the following computation up by 4-5x.
 > CodeTools:-Usage([seq(tan(n * 1e-4 + 20.*I), n=1..10^4)]):
 memory used=75.71MiB, alloc change=0 bytes, cpu time=811.00ms, real time=811.00ms, gc time=0ns