g++_quadmath_test


g++_quadmath_test, a C++ code which uses quadruple real precision arithmetic with the Gnu G++ compiler for C++.

Every C++ compiler offers a single precision real datatype called float as well as a double precision real data type called double.

Such variables can be declared with statements such as:

float w;
double x;

On some systems, the G++ compiler provides a real data type stored in 80 bytes, and declared as a __float80, and on some systems, a real data type stored in 128 bytes, declared as a __float128. Variable declarations would be

__float80 y;
__float128 z;

The Macintosh OSX system I have access to seems to have the __float80 option, but not the __float128 option.

Licensing:

The computer code and data files described and made available on this web page are distributed under the MIT license

Languages

g++_quadmath_test is available in a C version and a C++ version and a FORTRAN90 version.

Related Data and Programs:

g++_intrinsics_test, a C++ code which illustrates the use of intrinsic functions provided by the Gnu G++ compiler for C++.

g95_quadmath_test, a FORTRAN90 program which illustrates the use of quadruple precision real arithmetic provided on some systems by the G95 compiler for FORTRAN.

Reference:

  1. Brian Gough,
    An Introduction to GCC,
    Network Theory Ltd,
    ISBN: 0-9541617-9-3.
  2. Arthur Griffith,
    GCC: The Complete Reference,
    McGrawHill,
    ISBN: 0-07-222405-3.
  3. Richard Stallman,
    Using GCC: The Gnu Compiler Collection Reference,
    Free Software Foundation,
    ISBN: 1-882114-39-6.

Examples and Tests:


Last revised on 04 March 2020.