In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "there are several valid digits after the decimal point of the float type of the c language". In the daily operation, I believe that many people have doubts about the number of valid digits after the decimal point of the float type of the c language. The editor has consulted all kinds of data and sorted out a simple and useful method of operation. I hope it will be helpful for everyone to answer the doubt that there are several valid digits after the decimal point of the float type of the c language. Next, please follow the editor to study!
C language float type how many significant digits are there after the decimal point?
The valid digits after the decimal point of the float type are 6-7 digits.
The floating point type in C language is generally divided into float single precision type, double double precision type and long double long precision type. The effective digits after the single precision floating point and double precision floating point are 67.7 digits and 1516digits respectively. Single precision is 32 bits, double precision is 64 bits, and 8 bits is one byte.
The number of significant digits after the floating point is defined in the C language standard library header file float.h:
/ / part of the code of the float. H header file # define DBL_DIG 15 / / 15 places after the double precision decimal point # define FLT_DIG 6 / / 6 places after the single precision decimal point # define LDBL_DIG 19 / / long double precision decimal point 19
At this point, the study of "there are several valid digits after the decimal point of the float type of c language" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.