0.6.2-dev0
FORCES
FORtran lib for Comp. Env. Sys.
Loading...
Searching...
No Matches
mo_utils::special_value Interface Reference

Special IEEE values. More...

Public Member Functions

real(sp) function special_value_sp (x, ieee)
 
real(dp) function special_value_dp (x, ieee)
 

Detailed Description

Special IEEE values.

Returns special IEEE values such as Infinity or Not-a-Number.
Wraps to function ieee_value of the intrinsic module ieee_arithmetic.
Current special values are:

  • IEEE_SIGNALING_NAN
  • IEEE_QUIET_NAN
  • IEEE_NEGATIVE_INF
  • IEEE_POSITIVE_INF
  • IEEE_NEGATIVE_DENORMAL
  • IEEE_POSITIVE_DENORMAL
  • IEEE_NEGATIVE_NORMAL
  • IEEE_POSITIVE_NORMAL
  • IEEE_NEGATIVE_ZERO
  • IEEE_POSITIVE_ZERO

Example

Returns NaN

nan = special_value(1.0, 'IEEE_QUIET_NAN')
nan = special_value(1.0_dp, 'ieee_quiet_nan')
Parameters
[in]real(sp/dp) :: xdummy for kind of output
[in]character(le=*) :: ieeeieee signal nanme
Return values
real(sp/dp) :: special_valueIEEE special value, IEEE_SIGNALING_NAN, IEEE_QUIET_NAN (==IEEE_SIGNALING_NAN for gfortran), IEEE_NEGATIVE_INF, IEEE_POSITIVE_INF, IEEE_NEGATIVE_DENORMAL (==-0.0 for gfortran), IEEE_POSITIVE_DENORMAL (==0.0 for gfortran), IEEE_NEGATIVE_NORMAL (==-1.0 for gfortran), IEEE_POSITIVE_NORMAL (==1.0 for gfortran), IEEE_NEGATIVE_ZERO, IEEE_POSITIVE_ZERO,
Authors
Matthias Cuntz
Date
Mar 2015

Definition at line 496 of file mo_utils.F90.

Member Function/Subroutine Documentation

◆ special_value_dp()

real(dp) function mo_utils::special_value::special_value_dp ( real(dp), intent(in)  x,
character(len = *), intent(in)  ieee 
)
Parameters
[in]xdummy for kind of output.
[in]ieeeieee signal name.
Returns
real(dp) :: special_value — IEEE special value, IEEE_SIGNALING_NAN, IEEE_QUIET_NAN, IEEE_NEGATIVE_INF, IEEE_POSITIVE_INF, IEEE_NEGATIVE_DENORMAL, IEEE_POSITIVE_DENORMAL, IEEE_NEGATIVE_NORMAL, IEEE_POSITIVE_NORMAL, IEEE_NEGATIVE_ZERO, IEEE_POSITIVE_ZERO,

Definition at line 1339 of file mo_utils.F90.

References mo_utils::special_value_dp().

Here is the call graph for this function:

◆ special_value_sp()

real(sp) function mo_utils::special_value::special_value_sp ( real(sp), intent(in)  x,
character(len = *), intent(in)  ieee 
)
Parameters
[in]xdummy for kind of output.
[in]ieeeieee signal name.
Returns
IEEE special value, IEEE_SIGNALING_NAN, IEEE_QUIET_NAN, IEEE_NEGATIVE_INF, IEEE_POSITIVE_INF, IEEE_NEGATIVE_DENORMAL, IEEE_POSITIVE_DENORMAL, IEEE_NEGATIVE_NORMAL, IEEE_POSITIVE_NORMAL, IEEE_NEGATIVE_ZERO, IEEE_POSITIVE_ZERO,

Definition at line 1400 of file mo_utils.F90.

References mo_string_utils::compress(), mo_message::message(), and mo_utils::special_value_sp().

Here is the call graph for this function:

The documentation for this interface was generated from the following file: