I'd send a PR, but I'm not sure if the proper fix is to just cast channelLengths[i] when creating the stats file, or to change channelLengths (and the variables that are used in its computation) to an integral type.
Duplicate acknowledged. However, you did give me an extreme example case in the process... though it didn't reach the 32-bit limit, signed or unsigned in that case.
Example input
outputs:
This is because
channelLengths[0]
is a double andstd::hex
only affects integral types.The output can get stranger. https://smwc.me/s/31881 outputs
CHANNEL 5 TICKS: 0x1.18728E+06
I'd send a PR, but I'm not sure if the proper fix is to just cast
channelLengths[i]
when creating the stats file, or to changechannelLengths
(and the variables that are used in its computation) to an integral type.