Possible Duplicate:
32-bit to 16-bit Floating Point Conversion
How do I convert between 32-bit floats and 16-bit half-precision floats in C?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since C typically doesn’t have a 16-bit floating point type built-in, I would expect you would either have to
unsigned short. This will be portable, but might be a lot slower.Both of these assume all you want to do is build the value’s representation, you can’t do arithmetic using C’s operators of course.