quadruple precision is a binary floating-point-based computer number format that occupies 16 bytes (128 bits).
Questions tagged [quadruple-precision]
19 questions
13
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…
![](../../users/profiles/646385.webp)
RétroX
- 1,786
- 4
- 15
- 24
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…
![](../../users/profiles/721644.webp)
Vladimir F
- 50,383
- 4
- 60
- 96
6
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…
![](../../users/profiles/8429081.webp)
okruz
- 75
- 3
6
votes
1 answer
Quadruple precision in G++ 4.6.3 Linux using quadmath
I try 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 commands
g++ test.cpp -o test
I get the…
![](../../users/profiles/1854385.webp)
dStack
- 63
- 1
- 6
4
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)…
![](../../users/profiles/2022617.webp)
LeWavite
- 143
- 5
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…
![](../../users/profiles/3305448.webp)
maniA
- 1,267
- 2
- 15
- 32
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…
![](../../users/profiles/10083757.webp)
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:…
![](../../users/profiles/9961942.webp)
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,…
![](../../users/profiles/3778792.webp)
dalonsoa
- 195
- 1
- 10
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…
![](../../users/profiles/5572577.webp)
Yeti
- 401
- 3
- 13
1
vote
3 answers
Why optimization flag (-O3) doesn't speed up quadruple precision calculations?
I have a high-precision ODE (ordinary differential equations) solver written on C++. I do all calculations with user-defined type real_type. There is a typedef declaring this type in the header:
typedef long double real_type;
I decided to change…
![](../../users/profiles/2151062.webp)
Alex Koksin
- 109
- 1
- 6
1
vote
1 answer
Taking square root to quadruple precision
How can I do a square root for Real(Real128)?
![](../../users/profiles/4167161.webp)
Zeus
- 1,401
- 16
- 27
1
vote
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…
![](../../users/profiles/4143624.webp)
Thomas Prest
- 111
- 2
1
vote
2 answers
long double subnormals/denormals get truncated to 0 [-Woverflow]
In the IEEE754 standarad, the minimum strictly positive (subnormal) value is 2−16493 ≈ 10−4965 using Quadruple-precision floating-point format. Why does GCC reject anything lower than 10-4949? I'm looking for an explanation of the different things…
![](../../users/profiles/2089697.webp)
Harvinder
- 264
- 3
- 14