2

I would like to get 128 bit floating precision working for my C++ application on Windows. Currently I am able to do this on both Linux and macOS, using the g++ compilers with the quadmath and boost::multiprecision::float128 libraries.

On Windows, my application currently compiles with Visual Studio 2017, and is restricted to double precision.

It is unclear, researching on the internet, which of the available gcc-based toolchains provide working quadmath, for both x86 and x64. Is there a working compiler toolchain for Windows that supports float128 and quadmath?

francescalus
  • 30,576
  • 16
  • 61
  • 96
Juan
  • 3,667
  • 3
  • 28
  • 32
  • 1
    I can't imagine `__float128` is hardware-accelerated on x86 machines. Would https://www.mpfr.org/ suit your needs? – parktomatomi Nov 27 '19 at 04:19
  • @parktomatomi: the boost libraries support using mpfr, and should be as about fast as quadmath at 128 bit precision. https://www.boost.org/doc/libs/1_70_0/libs/multiprecision/doc/html/boost_multiprecision/tut/floats.html . Is there an relatively easy install for the Windows platform that can be called from boost? – Juan Nov 27 '19 at 22:00
  • @Juan: Can you compile with `g++` on Windows? – user14717 Oct 26 '20 at 16:33
  • @user14717, I am now using the MSYS2 environment with Mingw64 now to compile an extended precision version of my software. It seems to work, but I suggest the Visual C++ version (using double precision) for users. – Juan Oct 26 '20 at 17:05

0 Answers0