quadruple precision is a binary floating-point-based computer number format that occupies 16 bytes (128 bits).
Questions tagged [quadruple-precision]
24 questions
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…

Alex Koksin
- 129
- 1
- 6
1
vote
1 answer
Taking square root to quadruple precision
How can I do a square root for Real(Real128)?

Zeus
- 1,485
- 1
- 17
- 33
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…

Harvinder
- 274
- 3
- 15
0
votes
0 answers
gcc13: long double has almost the same precision of libquadmath; are they both 80-bit float implementations?
I thought GCC would currently (2023) implement 80-bit floats for long-double, and 128-bit floats with libquadmath...
However, with gcc 13.2.0 on an amd64 architecture (AMD FX-8320E), I see that the limits for long double and __float128 seem quite…

johjs
- 81
- 3
0
votes
1 answer
Ignore 'long' specifier for custom type in c++
I have a type and a template class
#ifdef USE_QUAD
using hybrid = __float128;
#else
using hybrid = double;
#endif
template
struct Time {
int day;
long T dayFraction; // This is an example, I need both in here, T and long…

A119
- 45
- 5
0
votes
1 answer
Running 128 bit Fortran calculations of a 64 bit computer
I have a 64-bit linux system. I compile and run my Fortran code using gfortran and this outputs some number to double precision i.e. ~ 16 decimal places. e.g.
gfortran some_code.f -o executable1
./executable1
10.1234567898765432
If I now compile…

user1887919
- 829
- 2
- 9
- 24
0
votes
0 answers
Print Quadruple Precision vector in C++
I'm trying to print a quadruple precision vector using GCC 4.7.1 in CodeBlocks. This is the code:
#include
#include
#include
...
int width = 46;
char buf[128];
for (std::vector<__float128>::const_iterator i =…

maja
- 697
- 5
- 18
-1
votes
2 answers
Double precision and quadruple precision in MATLAB
I want to convert data(double precision,15 decimal points) to data of another type(quadruple precision,34 decimal points). So, I used vpa function like this:
data = sin(2*pi*frequency*time);
quad_data = vpa(data,34);
But, the type of the result is…

Hak-Min Lee
- 35
- 6
-1
votes
1 answer
How can I write __float128 data type to binary file?
I am using quadmath library for quad-precision.
Can I use fwrite function to write to binary file?
struct rec
{
__float128 mydata;
}
struct rec my_record;
mydata=1.41421356237309504880q;
fwrite(&my_record, sizeof(struct rec), 1, myfile);