- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Thanks,
Gerry T.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's great. I'd forgotten about the REAL function.
Thanks,
Gerry T.
Thanks,
Gerry T.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page