I have received some code that uses quadruple precision in some parts:
IMPLICIT REAL*16 (A-H,O-Z)
IF (NS.EQ.2) THEN
B(1) = 0.5Q+00
and so on. However, I can’t compile this code with pgf77, pgf90, etc. I get an error
PGFTN-W-0031-Illegal data type length specifier for real
Is there a way to get this to compile and run?
REAL*16 is not currently supported with PGI Fortran.
Could this support be added to a future release? real*16 capabilities, even if it is “slow” because of software implementation, could be very useful for a number of applications.
Not sure if this will help, but there are a few Variable- or Multiple- or High-Precision Arithmetic libraries/modules for FORTRAN. I’ve never used any of them (I’ve been meaning to, but haven’t found the time), so I can’t say much about them. Two examples are http://crd-legacy.lbl.gov/~dhbailey/mpdist/ and http://myweb.lmu.edu/dmsmith/fmlib.html. If you do land up using something like these, it would be great if you could share some of your experiences.
Hope this helps.
Jerry, you could try using double-double, DD, The mantissa uses two double words, although the exponent is still limited to +/- E308. There is a paper on using it here in the PGI library - do a search.