Has "long double" a single word name?
Many new C++ data t开发者_StackOverflow社区ype names have a single word name, for example:
- int16_t instead of signed short int
- int64_t instead of signed long long int
- ...
Has "long double" a single word name?
These are not long/short names. "Names" like long int
, short int
, etc. are usual, BUT platform specific and do NOT have fixed size. For example, long int
could be 4B or 8B.
While names like intXX_t
is integer type with guaranteed fixed size - XX
bits.
And no, there's so such thing in the C++ standard for double
.
For more information about fixed size floating point types: Fixed-size floating point types
No, int16_t
doesn't always mean short
etc. int16_t
etc are integer types of specified size, while size of short
etc is unspecified. You don't need such things for floating point types, because their sizes are specified.
I don't think so. int16_t and others are defined in stdint.h. Nothing such exists for float/double.
BTW, long is a type modifier and double is a datatype.
In C++, You can define your own double class and make it useable by overloading operators.
Shash
I dont believe so, but you can just make your own
#define double64_t (long double)
typedef long double double64_t;
精彩评论