12.07.2015 Views

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2 Intel <strong>Fortran</strong> <strong>Libraries</strong> <strong>Reference</strong>iflag = ieee_flags('set', 'direction', 'tozero', out)The following example sets the rounding direction to the default ('nearest'):USE IFPORTINTEGER*4 iflagCHARACTER*1 out, iniflag = ieee_flags('clear','direction', '', '' )The following example clears all exceptions:USE IFPORTINTEGER*4 iflagCHARACTER*10 outiflag = ieee_flags('clear','exception', 'all', '' )The following example restores default direction and precision settings, and sets all exceptionflags to 0:USE IFPORTINTEGER*4 iflagCHARACTER*10 mode, out, iniflag = ieee_flags('clearall', '', '', '')The following example detects an underflow exception:USE IFPORTCHARACTER*20 out, inexcep_detect = ieee_flags('get', 'exception', 'underflow', out)if (out .eq.'underflow') stop 'underflow'IEEE_HANDLERPortability Function: Establishes a handler for IEEE exceptions.Module: USE IFPORTSyntaxresult = IEEE_HANDLER (action, exception, handler)action(Input) Character*(*). One of the following IEEE actions: 'GET', 'SET', or 'CLEAR'. For moredetails on these actions, see IEEE_FLAGS.2-168

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

Saved successfully!

Ooh no, something went wrong!