IEEE floating point representation

Source: Internet
Author: User
IEEE floating point number representation. I remember learning it before, but my impression is vague. I 'd like to take a look at it .:)

This article is written by the famous "Cream Dog" on csdn.
ArticleIt is easy to understand, but unfortunately there is an error: 12345.0f should be converted to float 00 E4 40 46, and 00 20 F1 47 should represent a floating point number of 123456.0f. many friends asked this question, which is probably a clerical mistake.

Http://www.csdn.net/develop/read_article.asp? Id = 28201

In the comments, flyindanceddr also adds two points:
1. when all the exponent bits are 0, There is no hidden 1 in the data bits. At this time, the 23 bits are all 0. the next 23 digits, instead of 1. then, and the index at this time is 1-bis (when the index is 8 bits, BIS is 127)
2. When all the exponent bits are 1, no matter what the data bit is, the number is Nan, that is, the reciprocal of not a number. 0 is Nan. Nan addition, subtraction, multiplication, and division.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.