Can I change the output of Message
to not show MachinePrecision
numbers? E.g.
Bleh::test = "test `1`";
This is tolerable:
Message[Bleh::test, 0.01]
(* Bleh::test -- test 0.01` *)
This is not:
xx = 0.01;
Do[xx += 0.04, {5}]
Message[Bleh::test, xx]
(* Bleh::test -- test 0.21000000000000002` *)
Is there a way for Message
to display this rounded off as:
xx
(* 0.21 *)
Message[Bleh::test, ToString@xx]
uses the currentPrintPrecision
, I think. -- Well, no, apparently not, but it rounds the output as desired. $\endgroup$