skip to Main Content

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


  1. The answer to your question is no (MSVC is an exception, with long double being a synonym for double); 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.

    Login or Signup to reply.
  2. Is it possible to use 80 bit floats with MSVC compiler?

    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, and long 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 implemented int 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-bit int.

    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).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search