This is generated C code from dbcppp dbc2 cli command

If you call both functions sequentially, you will find that the double conversion of the uint64_t will produce a very large value rather than negative value you are looking for.
Doing a reinterpret_cast of the binary data as an int, followed by a conversion back to a double will fix this behavior.

Surprised no one had encountered this earlier.
PS. the generated two successive return statements also seems to be an oversight
This is generated C code from
dbcppp dbc2cli commandIf you call both functions sequentially, you will find that the double conversion of the
uint64_twill produce a very large value rather than negative value you are looking for.Doing a
reinterpret_castof the binary data as anint, followed by a conversion back to adoublewill fix this behavior.Surprised no one had encountered this earlier.
PS. the generated two successive
returnstatements also seems to be an oversight