quadruple precision is a binary floating-point-based computer number format that occupies 16 bytes (128 bits).
Questions tagged [quadruple-precision]
24 questions
41
votes
4 answers
long double (GCC specific) and __float128
I'm looking for detailed information on long double and __float128 in GCC/x86 (more out of curiosity than because of an actual problem).
Few people will probably ever need these (I've just, for the first time ever, truly needed a double), but I…

Damon
- 67,688
- 20
- 135
- 185
14
votes
2 answers
Quadruple Precision in C++ (GCC)
Just recently, the GCC 4.6.0 came out along with libquadmath. Unfortunately, GNU has supported Fortran, but not C or C++ (all that is included is a .so). I have not found a way to use these new features in C++, however, GNU C does support the…

RétroX
- 1,996
- 4
- 16
- 24
8
votes
1 answer
Epsilon in quadruple precision (gcc)
According to wikipedia, the layouts of the different precision data types are
single precision: exponent (e): 8 bits, fraction (f): 23 bits
double precision: e: 11 bits, f: 52 bits
quadruple precision: e: 15 bits, f: 112 bits.
I wrote a small…

okruz
- 95
- 3
8
votes
1 answer
Strange result of MPI_AllReduce for 16 byte real
Compiler: gfortran-4.8.5
MPI library: OpenMPI-1.7.2 (preinstalled OpenSuSE 13.2)
This program:
use mpi
implicit none
real*16 :: x
integer :: ierr, irank, type16
call MPI_Init(ierr)
call MPI_Comm_Rank(MPI_Comm_World, irank, ierr)
if…

Vladimir F Героям слава
- 57,977
- 4
- 76
- 119
7
votes
1 answer
Quadruple precision in G++ 4.6.3 Linux using quadmath
I've tried to execute the code
#include
#include
int main()
{
char* y = new char[1000];
quadmath_snprintf(y, 1000, "%Qf", 1.0q);
std::cout << y << std::endl;
return 0;
}
with this command
g++ test.cpp -o test
But I…

dStack
- 73
- 1
- 7
5
votes
2 answers
CPU time in quadruple vs. double precision
I am doing some long-term simulations in which I'm trying to achieve the highest possible accuracy in the solution of systems of ODEs. I am trying to find out how much time quadruple (128-bit) precision calculations take versus double (64-bit)…

LeWavite
- 153
- 5
3
votes
2 answers
Quad-precision numbers with Intel Compiler (icc)
I have been trying to work with Intel's Quad-precision floats. I have the following code, and it is returning unexpected results.
#include
#include
int print(const char *label, _Quad r) {
int prec = 20;
int width = 46;
char…

Seva Safris
- 401
- 4
- 12
2
votes
1 answer
Why is my C++ program so slow when switching from long double to float128?
I program on Unix, using the g++ 4.8.2 compiler. I currently need to convert my C++ program, which at this point uses long double (with a significand of 64 bits in my case), to a program which uses the __float128 type (with a significand of 113…

Thomas Prest
- 123
- 3
2
votes
2 answers
quadmath and argument type for scanf
I use the . With which argument type can I read my input correctly?
If I use double it looks like:
printf("enter 3 values for s, t and mt:\n");
scanf("%lf %lf %lf", &s, &t, &mt);
printf("%lf %lf %lf\n", s, t, mt);
I tried different…

maniA
- 1,437
- 2
- 21
- 42
1
vote
1 answer
How can I get Quadruple precision in Swift?
I have a project I would like to do in Swift, but I need 32 digit precision for my floating point arithmetic and properties. Can anyone tell me what would be the simplest way to get quad precision in Swift?

Max
- 33
- 3
1
vote
0 answers
Set the default real type to an 16 byte in c program
With gfortran compiler, the flag -fdefault-real-16 helps to set the default real type to an 16 byte wide type.
for example
program qp_test
implicit none
double precision :: a
a = 123456789012345678.123456789012345678
…
1
vote
0 answers
MPICH libraries for quadruple precision not recognised by FFTW3?
I am converting my parallel double precision fortran code that involves calls to FFTW3 and BLAS-LAPACK packages to parallel quadruple precision.
I have installed FFTW3 for quadruple precision as follows:
./configure --enable-quad-precision…

sai
- 155
- 4
1
vote
0 answers
Quadruple precision float support on Intel C++ compiler 18.0 update 3 in vs 2017
I just tried to compile a C++ program with boost::multiprecision::float128 support in Visual Studio 2017 using Intel C++ compiler 18.0 update 3.
I add /Qoption,cpp,--extended_float_type to project C/C++ additional options.
However, ICC emit E0020:…

S. Nie
- 21
- 3
1
vote
0 answers
Strange behaviour using quadruple precision in Fortran using Mingw (Anaconda version)
Windows 7 64 bits
GNU Fortran (GCC) 4.7.0 20111220 (experimental) --> The MinGW version installed with Anaconda3/Miniconda3 64 bits.
Hi all,
I'm trying to compile some Fortran code to be used from Python using F2Py. The full project is Solcore,…

dalonsoa
- 215
- 3
- 11
1
vote
1 answer
Quadruple precision on Linux vs. Mac
I have written a multi-dimensional numerical integration code which is able to run at double, long double or quadruple precision in Linux. All modes compile and work flawlessly but when I try to compile the same code for the quadruple precision case…

Yeti
- 425
- 4
- 15