Increased format precision for substituted variables

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@194 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
athomps
2006-12-15 00:18:12 +00:00
parent 2041f82bc4
commit fa679fd3e1

View File

@ -594,7 +594,7 @@ char *Variable::evaluate(char *str)
delete [] arg2;
delete [] strarg2;
}
sprintf(result,"%g",answer);
sprintf(result,"%.10g",answer);
// if string is "vector", find which proc owns atom, grab vector value
@ -642,7 +642,7 @@ char *Variable::evaluate(char *str)
delete [] vector;
delete [] arg;
sprintf(result,"%g",answer);
sprintf(result,"%.10g",answer);
// if string is "keyword", compute appropriate value via thermo
@ -683,7 +683,7 @@ char *Variable::evaluate(char *str)
if (flag) error->all("Invalid keyword in variable equal command");
}
sprintf(result,"%g",answer);
sprintf(result,"%.10g",answer);
// string is a number, just copy to result