Debug entropy value (floating point)

Since DbgPrint does not support %f in kernel , I tried RtlStringCbPrintfW with the double value , and write to a file doesn’t seem to support it either .

to add context , im trying to calculate entropy , made sure to keep and restore the floating point state

It’s only for a research , im not actually going to use it in prod :slight_smile:

I don't know the answer, but it is quite possible that WPP and DoTraceMessage support %f. Of course then you have to bother with converting to ETW and viewing your trace messages. As there is no in kernel expansion of the formats there is no reason to not support %f. Also the IFR (in flight recorder) lets you connect your driver to the always on IFR system and view your trace logs through windbg.

If it is really important it might be worth investigating.

one way would be to write the binary (or hex) values to your string and then make a simple tool to post process the log and convert to the decimal format you expect

You can also write a conversion routine yourself. A comprehensive version might be 500 lines of C code, but a quick and dirty is probably 50. There is probably something on the net you can copy or modify