Gaussian distribution set_sigma(0) produces strange monte carlo output directory, suspected gsl only

Found that when we hex pack numbers out of the random number generator we should zero pad
these numbers to 16 digits.  Otherwise if the resulting number is an odd number of digits we
get an error.  We already do this for file data.

refs #236
This commit is contained in:
Alex Lin 2016-05-11 10:07:02 -05:00
parent 5b27723501
commit 9b68fa9d9e

View File

@ -183,7 +183,7 @@ std::string Trick::MonteVarRandom::get_next_value() {
default:
sprintf(buffer, "%.10g", return_value.d);
value = buffer;
sprintf(buffer, "struct.unpack(\"!d\", binascii.unhexlify(\"%llx\"))[0]", return_value.ll);
sprintf(buffer, "struct.unpack(\"!d\", binascii.unhexlify(\"%016llx\"))[0]", return_value.ll);
break;
}