Popular float bytes

When looking through memory dumps it's often useful to keep an eye out for some well-known float values.

Here's a little table with the byte dumps as you might seem them on an x86 system.

-INFINITY:  00 00 80 ff
-1:         00 00 80 bf
-FLT_MIN/2: 00 00 40 80
-0:         00 00 00 80
0:          00 00 00 00
FLT_MIN/2:  00 00 40 00
1:          00 00 80 3f
INFINITY:   00 00 80 7f
NAN:        00 00 c0 ff

Happy floats!

Tags:  codingdebugging

Home