In FlexSim XML files, double values are not stored as a single hexadecimal number. They are stored based on how they are represented in memory in C++, converted to a string.
Kind of like this:
void savedata(char*& output)
{
*((double *)output) = data[0];
output += sizeof(double);
}
When they are loaded, the bits are loaded directly into a double value. Kind of like this:
void loaddata(const char*& input)
{
((double*)data)[0] = *((double *)input);
input += sizeof(double);
}
The string you see in the XML file is the chars that represent the bits in memory.
Each 4-bit char is stored as one hexadecimal digit. A double has 64 bits, so it is represented by 16 hexadecimal chars.
For more information, see https://en.wikipedia.org/wiki/Double-precision_floating-point_format. (Although the examples in that article have a different endianness than you see in FlexSim XML files. For instance, the example of 1 in that article is 3FF0 0000 0000 0000, and in FlexSim XML it is 000000003ff00000. The first 8 chars are switched with the last 8 chars.)
Phil BoBo
Sr. Manager, Software Development