12.07.2015 Views

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Descriptions of the Library Routines 2action mode in out DescriptionCLEAR 'direction' Null (' ') Null (' ') Clears the mode. Sets rounding to'nearest'.Returns 0 if successful.'exception'One of 'inexact','division','underflow','overflow', 'invalid','all', or 'common'Null (' ')Clears the mode.Returns 0 if successful.'precision' Null (' ') Null (' ') Clears the mode. Sets precisionto 'double' (W*32, W*64) or'extended' (L*X).Returns 0 if successful.CLEARALL Null (' ') Null (' ') Null (' ') Clears all flags. Sets rounding to'nearest', sets precision to 'double'(W*32, W*64*) or 'extended'(L*X), and sets all exception flagsto 0.Returns 0 if successful.ResultsIEEE_FLAGS is an elemental, integer-valued function that sets IEEE flags for GET, SET,CLEAR, or CLEARALL procedures. It lets you control rounding direction and roundingprecision, query exception status, and control exception enabling or disabling by using the SET orCLEAR procedures, respectively.The flags information is returned as a set of 1-bit flags.ExamplesThe following example gets the highest priority exception that has a flag raised. It passes the inputargument in as a null string:USE IFPORTINTEGER*4 iflagCHARACTER*9 outiflag = ieee_flags('get', 'exception', '', out)PRINT *, out, ' flag raised'The following example sets the rounding direction to round toward zero, unless the hardware doesnot support directed rounding modes:USE IFPORTINTEGER*4 iflagCHARACTER*1 mode, out, in2-167

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!