ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_except Module Reference

This module contains procedures and generic interfaces for testing for exceptional cases at runtime.
More...

Data Types

interface  getInfNeg
 Generate and return an IEEE-compliant negative infinity. More...
 
interface  getInfPos
 Generate and return an IEEE-compliant positive infinity.
More...
 
interface  getNAN
 Generate and return an IEEE-compliant quiet NAN (Not a Number).
More...
 
interface  isAddOutflow
 Generate and return .true. if and only if the addition of the two input integer, complex , or real values causes runtime negative or positive outflow (overflow). More...
 
interface  isAddOutflowNeg
 Generate and return .true. if and only if the addition of the two input integer, complex , or real values causes runtime negative outflow (overflow). More...
 
interface  isAddOutflowPos
 Generate and return .true. if and only if the addition of the two input integer, complex , or real values causes runtime positive outflow (overflow). More...
 
interface  isInf
 Generate and return .true. if the input value is an IEEE-compliant negative or positive infinity. If the input value is a complex number, then the output is .true. if any of the two real or imaginary components or both components are either negative or positive infinities. More...
 
interface  isInfNeg
 Generate and return .true. if the input value is an IEEE-compliant negative infinity.
More...
 
interface  isInfPos
 Generate and return .true. if the input value is an IEEE-compliant positive infinity.
More...
 
interface  isNAN
 Generate and return .true. if the input value is an IEEE-compliant NAN (Not a Number) or if the input value x is not equal to its input copy xcopy, a characteristic behavior of NAN values.
More...
 
interface  setInfNeg
 Return an IEEE-compliant negative infinity.
More...
 
interface  setInfPos
 Return an IEEE-compliant positive infinity.
More...
 
interface  setNAN
 Return an IEEE-compliant quiet NAN (Not a Number).
More...
 

Variables

character(*, SK), parameter MODULE_NAME = "@pm_except"
 

Detailed Description

This module contains procedures and generic interfaces for testing for exceptional cases at runtime.

Three exceptional cases are currently handled by the procedures of this module,

  1. Addition Outflow: Testing whether numerical negative or positive overflow can occur in an addition operation for arbitrary intrinsic numeric types and kinds, without the risk of facing runtime positive or negative outflow (overflow) errors.
    There are two scenarios leading to an addition a + b outflow:
    1. Negative Overflow occurs if and only if a < 0 && b < 0 && a < min - b.
    2. Positive Overflow occurs if and only if 0 < a && 0 < b && max - b < a.
    where min and max refer to the minimum and maximum possible values for the type and kind of the pair (a,b).
  2. Infinity: obtaining or testing for occurrences of real and complex IEEE-compliant infinity values.
  3. Not-A-Number (NAN): obtaining or testing for the occurrences of real and complex IEEE-compliant NaN (Not A Number) values.
Test:
test_pm_except


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, April 23, 2017, 1:36 AM, Institute for Computational Engineering and Sciences (ICES), University of Texas at Austin

Variable Documentation

◆ MODULE_NAME

character(*, SK), parameter pm_except::MODULE_NAME = "@pm_except"

Definition at line 52 of file pm_except.F90.