- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am using Composer XE for Fortran (12.1 and 13) . I am trying to determine if the IEEE extended presicion (80 bits) and quad precision (128 bits) formats are supported in versions 12.1 or 13 of the Fortran compiler.
I have been going over the manual but the only relevant information I ran into "Using Efficient Data Types" where it states that "Extended-precision real, expressed explicitly as REAL (KIND=16) or REAL*16"
What is real(kind=16) for Intel Fortran then? Is it what IEEE calls the 128 bit quad precision ? Is extended precision supported as such and how can we declare it ?
Thanks
Michael
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, REAL(16) is the same as IEEE 128-bit quad precision. No, Intel Fortran does not support 80-bit extended precision.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the quick reply.
Onto the FP issues: Looking at the man page for ifort (12.1) at the -fp-model options with argument precise, fast=[1|2], strict and source, etc. Further down it reads
-fp-model source or /fp:source
This option causes intermediate results to be rounded to the precision defined in
the source code. It also implies keyword precise unless it is overridden by a
keyword from Group A.
long double: 64-bit precision; 80-bit data type; 15-bit exponent
double: 53-bit precision; 64-bit data type; 11-bit exponent; on Windows systems using IA-32 archi-
tecture, the exponent may be 15-bit if an x87 register is used to hold the value.
float: 24-bit precision; 32-bit data type; 8-bit exponent
Is the discussion on double, long double, extended just a cut and paste (:-) error from the corresponding C/C++ man page? Or does it imply that intermediate results are using the 80-bit extended ? Incidentally in C/C++ long double occupies 128 bits which hopefully corresponds to the IEEE Quad....
I think these documentain bits need to become a little more consistent. Documentation maybe should explicitly state the underlying implementation format that each declaration corresponds to.
thanks
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The only case in which expressions may be evaluated with 80-bit extended precision format is in the ia32 (32-bit) compiler, with -mia32 -pc80 options, as ifort doesn't support a real(10) data type. There is lack of compatibility between the usual linux C or C++ 80-bit long double and the Fortran real(16) IEEE quad data type.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe that the text you cite is just copied from C++. It does not appear in the 13.0 documentation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
TimP (Intel) wrote:
The only case in which expressions may be evaluated with 80-bit extended precision format is in the ia32 (32-bit) compiler, with -mia32 -pc80 options, as ifort doesn't support a real(10) data type. There is lack of compatibility between the usual linux C or C++ 80-bit long double and the Fortran real(16) IEEE quad data type.
Thanks for the clarification,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve Lionel (Intel) wrote:
I believe that the text you cite is just copied from C++. It does not appear in the 13.0 documentation.
This excerpt is from "man ifort" for the 12.1 compiler. I just checked the public HTML Users Guide for Fortran 12.1 and this is not there, indeed.
Incidentally, the man ifort for Fortran 13.1 under option "-fp-model source" also mentions:
-fp-model source or /fp:source
This option causes intermediate results to be rounded to the precision
defined in the source code. It also implies keyword precise unless it is
overridden by a keyword from Group A.
long double: 64-bit precision; 80-bit data type; 15-bit exponent
double: 53-bit precision; 64-bit data type; 11-bit exponent; on Windows systems using IA-32
architecture, the exponent may be 15-bit if an x87 register is used to hold the value.
The reason I am nit-picking on these details is that I would like to provide definite statements in an upcomming class concerning Intel compilers on our systems. I have a discussion on FP operations, semantics and limits so it would be great to have precise information concerning what Intel Fortran and C/C++ support and what high-level data types map to wrt to IEEE binary formats.
Timothy helped me out by pointing that the 80-bit formats are used in the IA32 and windwoes systems only, so I am OK since we are exclusively doing Intel64.
V -fp-model source or /fp:source
This option causes intermediate results to be rounded to the precision
defined in the source code. It also implies keyword precise unless it is
overridden by a keyword from Group A.
long double: 64-bit precision; 80-bit data type; 15-bit exponent
double: 53-bit precision; 64-bit data type; 11-bit exponent; on Windows systems using IA-32
architecture, the exponent may be 15-bit if an x87 register is used to hold the value.
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve Lionel (Intel) wrote:
I believe that the text you cite is just copied from C++. It does not appear in the 13.0 documentation.
Steve,
for Fortran 12.1 and 13.x when the target is Inte64, the real*16 is an actual 128 bit IEEE quad or is it emulated by an 80-bit extended? I assume that it is handled exlusively in S/W , correct?
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is an actual 128-bit IEEE quad, emulated in software.
I don't see the text you quote in the 13.0 manual's description of -fp-model. See here,
I've attached a presentation we give to customers on the FP model.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve Lionel (Intel) wrote:
It is an actual 128-bit IEEE quad, emulated in software.
I don't see the text you quote in the 13.0 manual's description of -fp-model. See here,
I've attached a presentation we give to customers on the FP model.
Steve,
This text appears only in the man pages for Linux (12.1 and 13.0). The text on actual Users Guides is consistent.
Thanks for the presentation! I have been going through the Fortran (and C/C++) User Guides, Martyn Gorden's articles and Kahan's papers. This rounds out nicely everything.
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok - I'll get the man pages corrected.
The presentation is Martyn Corden's.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page