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
Beginner
601 Views
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 Kudos
3 Replies
Steven_L_Intel1
Employee
601 Views
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 Kudos
g_f_thomas
Beginner
601 Views
That's great. I'd forgotten about the REAL function.

Thanks,
Gerry T.
0 Kudos
Steven_L_Intel1
Employee
601 Views
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 Kudos
Reply