Reputation: 23
Is there any specific data type for Microsoft's compiler for representing floating data points. I seem to find only float, double and long double
Upvotes: 1
Views: 257
Reputation: 93476
No. At time of writing Visual C++ v16 a.k.a Visual C++ 2019, does not support any floating point data types other than those defined in the C and C++ standards. Moreover unlike GCC on Intel x86/x64 targets, double
and long double
have teh same 64-bit representation.
This is documented at https://learn.microsoft.com/en-us/cpp/cpp/fundamental-types-cpp?view=msvc-160
The Intel x86/x64 FPU supports an 80 bit data type in hardware, but it is not directly supported by a data type.
GCC on the other has a number of extended types https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html including a __float80
to match the hardware and a __float128
. long double
is not the same as double
on GCC.
Upvotes: 4