I have a small program which shows the memory bytes of different variable.
For example, for int 123, it is saved as 0x00,00,00,7b
for float 123.0, it is saved as 0x42,f6,00,00
for double 123.0, when it is 8 bytes, it is saved as 0x40,5e,c0,00,00,00,00,00. The LSB will be filled when your double variable's value increases. For example, for double 123456789, it's memory is 0x41,9d,6f,34,54,00,00,00.
there is an artical "What Every Computer Scientist Should Know About Floating-Point Arithmetic". You should be able to find it on the web.
If you want the program or the article, just let me know, I can email them to you.
HTH.
For example, for int 123, it is saved as 0x00,00,00,7b
for float 123.0, it is saved as 0x42,f6,00,00
for double 123.0, when it is 8 bytes, it is saved as 0x40,5e,c0,00,00,00,00,00. The LSB will be filled when your double variable's value increases. For example, for double 123456789, it's memory is 0x41,9d,6f,34,54,00,00,00.
there is an artical "What Every Computer Scientist Should Know About Floating-Point Arithmetic". You should be able to find it on the web.
If you want the program or the article, just let me know, I can email them to you.
HTH.