I am using Visual Studio with the MSVC compiler. Basically any other compiler seems to support native 80 bit floats of x86/x64 CPUs, except MSVC. It seems that a workaround would be using inline assembler, but apparently MSVC does also not support this in 64 bit mode.
Is there some possibility to make use of the 80-bit-float-capabilities of my CPU with MSCV? Performance would have highest priority, so any software solution is out of the question. Portability is not an issue since I would only use my code on Windows x64 machines.
2
Answers
The answer to your question is no (MSVC is an exception, with
long double
being a synonym fordouble
); source: Wikipedia.For Windows and as explained there, you can configure MSVC IDE to use the Intel C++ compiler which, according to the above source, supports 80-bit doubles, if using the
/Qlong‑double
switch.Unfortunately, the answer is "no."
From day one, we are all taught that the underlying types used by standard types, such as
int
,long long int
, andlong double
, are implementation specific. We are warned that the implementation could change, even between two versions of the same compiler. Back in the 1980’s, for instance, Microsoft implementedint
as a 16-bit type, as they should have. Back then, Intel’s microprocessors had a 16-bit word size. Later, when processors evolved, Microsoft switched to a 32-bitint
.Today, unfortunately, Microsoft has frozen its type definitions. Even where the hardware supports it, Microsoft won’t give us 128-bit integers and 80-bit floats (or bigger).