Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

IVF's QEXT

g_f_thomas
초급자
1,633 조회수
There doesn't appear to be a converse to QEXT. Is there a workaround? Would x(REAL(8)) = y(REAL(16)) work?

Thanks,
Gerry T.
0 포인트
3 응답
Steven_L_Intel1
1,633 조회수
You want to convert a REAL(16) to a REAL(8)? You can just do the assignment or, and this works for any conversion, use REAL(x,8) to convert x, no matter what numeric type it is, to REAL(8).
0 포인트
g_f_thomas
초급자
1,633 조회수
That's great. I'd forgotten about the REAL function.

Thanks,
Gerry T.
0 포인트
Steven_L_Intel1
1,633 조회수
I would recommend using the REAL, INT and CMPLX functions with their KIND specifiers in new code - it is standard and less confusing. Of course, for portability, you'd want to combine this with a set of PARAMETER constants that specify the kind values using SELECTED_REAL_KIND, etc.
0 포인트
응답