I have a decimal number (such as 0.15625) which is stored as 32-bit floating point (fp32) number (0-01111100-01000000000000000000000 (sign-exponent-mantissa)) in memory. I want to convert that fp32 to fp16, and then show it in decimal. I guess the original and converted decimal numbers should be approximately same.
Obviously to store the converted number in memory I need to show that fp16 version (which is 16 bits) in 32 bits.
I am looking for a bunch of code in Matlab or C++ to do this conversion.
Your support is really appreciated.