How to specify real*16 data on AMD64 machines?


As we know, doube precision for 32-bit CPU means 32x2=64 bits, so naturally for 64-bit CPU it shoulbe be 128 bits. But I couldn’t find the pgf90’s switch to turn on 128-bit double precision on my AMD64 machine. Has anyone tried this before? I tried Sun’s f90 and intel ifc, they both seem to have this switch such as ‘-xtypemap=double:128’ and ‘-r16’. pgf90 should also have similar switch, but I just couldn’t find it.


Hi Johnix,

We do not natively support REAL16. Since 128-bit floating point calculations are not supported by the hardware, such calculation need to be handled by extremely slow software emulation. Most users who want REAL16 tell us they would not use such a package if the performance did not match that of REAL8. We have considered supporting REAL16 by using the 80-bit x87 FPU for calculations as some other compiler vendors do, but this is really REAL10 and calling it REAL16 doesn’t actually make it so. So our choices are to either cheat, or spend a lot of time developing a emulation package very few people would use.

For those of you who need precsion over performance, there are several good freely available quad precision emulation packages out on the web. We cannot recommend any particular package, but you should be able to find one that works for you.