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