My current code is:
round = .1;
f[x_] := x + 4 - Sqrt[3 x^2 - 5]
xx = Solve[f[x] == 0, Reals];
StringForm["x=`1`",
If[Length[xx] >= 1, Round[Max[xx[[All, 1, 2]]], round],
"none"]]
x=5.800000000000001`
which i want to give me an output of "x = 5.8" instead.
Any advice would be appreciated.
StringForm["x=
1", If[Length[xx] >= 1, Round[Max[xx[[All, 1, 2]]], round // Rationalize] // N, "none"]]
$\endgroup$N
:N[Round[Max[xx[[All, 1, 2]]], 1/10]]
$\endgroup$