- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
There is REAL*16 type for quadruple precision entities in Fortran. Is there similar type in Intel C++?
My ultimate goal is to use Fortran library relying on REAL*16 from C++ application. This means that I need equivalent quadruple precision type in both languages. Is there any?
Is it _Quad? If yes, is there any documentation about it?
As a workaround, can I safely assume that REAL*16 can be represented in C++ by just two values of int64_t?
So that I can pass arguments to Fortran functions using something like struct{ int64_t a, int64_t b}
I would appreciate any help on this.
링크가 복사됨
5 응답
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
As far as I know, Intel C++ does not currently support the 128-bit floating type of Intel Fortran. If you simply want to pass it around, you can use any 16-byte container as long as you don't ask for it to be passed by value. (If you do, you'll run into problems on x64.)
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Thank you Steve for your reply!
One more related question. What is the internal format of REAL*16?
Does it follow (or is it compatible with) IEEE 754-2008 standard (binary128)?
15 bits exponent, 113 mantissa and other properties?
Knowing REAL*16 format I can create corresponding type in C++.
Thank you in advance
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I've been informed that Intel C++ 13.0, as well as gcc 4.7, support the __float128 type and this is the same as Intel Fortran's REAL(16). It is the same as the IEEE 754-2008 128-bit floating type. Note that ISO_C_BINDING does not contain a definition for this type.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Thank you for reply.
I use Intel(R) C++ Compiler XE 13.0 on Windows with MSVC 2010.
It doesn't support __float128 type: "error : identifier "__float128" is undefined" .
I guess it is supported only in Linux version of compiler? Or do I need some special tricks to enable it on Windows version of C++ (since Fortran already has it as REAL*16)?
