What does float mean in C language?

Release: 2020-03-03 15:22:49
Original
121013 people have browsed it

What does float mean in C language?

float is one of the basic data types of C language, representing single-precision floating point numbers.

Recommended: "c Language Tutorial"

C language stipulates that single-precision floating point types occupy 4 bytes in memory, the precision is 7 bits, and the value range is :3.4*10^-38 ~3.4*10^38 or -(3.4*10^-38 ~3.4*10^38)

You can define single-precision floating-point variables, such as float a; that is, define A single-precision floating-point variable a. Related types: double represents a double-precision floating point number.

Floating point numbers are expressed in exponential form in the machine and are decomposed into four parts: number sign, mantissa, exponent sign, and exponent.

The number symbol occupies 1 binary digit and represents the positive or negative number.

The exponent sign occupies 1 binary digit, indicating the positive or negative of the exponent.

The mantissa represents the valid digits of the floating point number, 0.xxxxxxx, but the leading 0 and dot are not stored.

The exponent stores the significant digits of the exponent.

For more programming related content, please pay attention to the Programming Introduction column on the php Chinese website!

The above is the detailed content of What does float mean in C language?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!