title: fp32 to fp16 and reverse conversion - Matlab or C++ code
body: <p>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.    </p>
  
  <p>Obviously to store the converted number in memory I need to show that fp16 version (which is 16 bits) in 32 bits.</p>
  
  <p>I am looking for a bunch of code in Matlab or C++ to do this conversion. </p>
  
  <p>Your support is really appreciated. </p>