mirror of
https://github.com/nasa/trick.git
synced 2025-01-06 13:18:46 +00:00
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:
parent
5b27723501
commit
9b68fa9d9e
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user