Question: why latex fails on matrix after doing evalf with simplify?

This is strange problem. I have matrix M. when doing latex(M), it works. But when doing latex(simplify(evalf[16](M))) it gives internal Maple error 

Error, (in unknown) invalid input: ^ expects 2 arguments, but received 1

any workaround or ideas why it happens?

Maple 2023.2 on windows 10.

restart;

2848

interface(version)

`Standard Worksheet Interface, Maple 2023.2, Windows 10, October 25 2023 Build ID 1753458`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1590. The version installed in this computer is 1585 created 2023, October 29, 6:31 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2023\Physics Updates\lib\`

expr:=Matrix(3, 3, [[(-a^2-b^2-c^2)^(1/2),b*c/a,-b*c/a],[0,-(a^2+b^2)/(-a^2-b^2-c^2)^(1/2),c*a/b-c^2/(-a^2-b^2-c^2)^(1/2)],[0,0,0]]);
latex(expr);

Matrix(3, 3, {(1, 1) = sqrt(-a^2-b^2-c^2), (1, 2) = b*c/a, (1, 3) = -b*c/a, (2, 1) = 0, (2, 2) = -(a^2+b^2)/sqrt(-a^2-b^2-c^2), (2, 3) = c*a/b-c^2/sqrt(-a^2-b^2-c^2), (3, 1) = 0, (3, 2) = 0, (3, 3) = 0})

\left[\begin{array}{ccc}
\sqrt{-a^{2}-b^{2}-c^{2}} & \frac{b c}{a} & -\frac{b c}{a}
\\
 0 & -\frac{a^{2}+b^{2}}{\sqrt{-a^{2}-b^{2}-c^{2}}} & \frac{c a}{b}-\frac{c^{2}}{\sqrt{-a^{2}-b^{2}-c^{2}}}
\\
 0 & 0 & 0
\end{array}\right]

expr:=simplify(evalf[16](expr));
latex(expr);

Matrix(3, 3, {(1, 1) = 1.*sqrt(-a^2-b^2-c^2), (1, 2) = b*c/a, (1, 3) = -1.*b*c/a, (2, 1) = 0., (2, 2) = (-1.*a^2-1.*b^2)/sqrt(-a^2-b^2-c^2), (2, 3) = c*a/b-1.*c^2/sqrt(-1.000000000*a^2-1.000000000*b^2-1.000000000*c^2), (3, 1) = 0., (3, 2) = 0., (3, 3) = 0.})

Error, (in unknown) invalid input: ^ expects 2 arguments, but received 1

 

(will send to Maplesoft)

Download latex_problem_after_using_evalf_nov_23_2023.mw

Please Wait...