I noticed on windows and linux x86, float - 4 bytes, double - 8, but the long double - 12 and 16 on x86 and x86_64 respectively. It is anticipated that the C99 will break down such barriers with specific integrated dimensions.
The initial technological limitation seems to be due to the fact that the x86 processor is not able to handle more than 80 bits of floating operations (plus 2 bytes to round it), but why is there a discrepancy in the standard compared to int types? Why don't they go at least to 80-bit standardization?
C , .
- C (, signed char - -127 127, short int -32,767 32,767, long - - 2,147,483,647 2,147,483,647, long long -9,223,372,036,854,775,807 9,223,372,036,854,775,807). , .
signed char
short
int
long
long long
C99 , int32_t - - , .
int32_t
(, double 10 ).
double
( ) C, IEEE.
int , , , , .. int , (= ). , , , .
floaton the other hand, it is a design for a very specific use (floating point arithmetic). You can hardly determine exactly how many bits you need for yours float. In fact, in most cases, the more bits you have, the better.
float
Source: https://habr.com/ru/post/1758804/More articles:Equivalent of Crosstab Access request in SAS? - sassockaddr_in6 not declared? - c ++matplotlib full screen mats - pythonAre Java ACM libraries in real life? - javavector T> :: is iterator invalid? - c ++Dynamic Programming Idiom for Combinations - language-agnostic"Go to definition" is grayed out, but I can find the variable through a search in the same file - debuggingCopying (capturing) only visible text in emacs mode - emacsКак я могу упростить этот массив? - arraysSimple encryption / decryption features in classic ASP - encryptionAll Articles