Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software Development Tools (Compilers, Debuggers, Profilers & Analyzers)
- Intel® Fortran Compiler
- How does ifort deal with kind(25, 1000) and kind (33)?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Highlighted
##

Eduardo_M_4

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-23-2016
04:56 PM

14 Views

How does ifort deal with kind(25, 1000) and kind (33)?

Hello

I am not sure whether I understand how ifort deals with different kinds of variable. What is the different between a real that uses kind(25,1000) and a real with kind(33)? When I see the outputs of range, precision, huge, tiny and kind, they seem to be the same for both variables. Why can't I define kind(40)? How to use a real with 16 bits?

Thanks fot the patience and help.

Cheers

Ed

2 Replies

Highlighted
##

TimP

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-23-2016
06:13 PM

14 Views

If you mean to ask about selected_real_kind, the subject is covered well in textbooks and compiler manuals.

Yes, there are only a few kinds supported by each compiler, so it should not be surprising if selected_real_kind(25,1000) turns out the same as selected_real_kind(33) (REAL128, the smallest kind which matches those parameters).

According to my reading of the ifort manual, there is no Fortran support for 16-bit real. In the Intel hardware which supports that format, expressions involving those numbers are evaluated using c_float (same as REAL32) and so could be saved as REAL32 or rounded off again to 16-bit real.

Highlighted
##

Tim is correct. SELECTED_REAL_KIND returns you the smallest kind number for a supported kind that meets the specified precision and range values, or a negative number if none do. Intel Fortran does not support 16-bit floats and has no plans to do so. (Nor does it support 80-bit floats.)

Steven_L_Intel1

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-24-2016
06:41 AM

14 Views

For more complete information about compiler optimizations, see our Optimization Notice.