Assuming test6 is required, the following result was found.
= 12.345; info v_Test5.toString().replaceAll("^(^-?\\d+\\.\\d*[1-9])(0+$)|(\\.0+$)", "$1", false); // yields 12.345 v_Test6 = 120.000; info v_Test6.toString().replaceAll("^(^-?\\d+\\.\\d*[1-9])(0+$)|(\\.0+$)", "$1", false); // yields 120 v_Test7 =...