ARTS 2.5.0 (git: 9ee3ac6c)
nonstd Namespace Reference

Functions

template<class T >
constexpr T abs (T x) noexcept
 
constexpr int isdigit (int ch) noexcept
 
constexpr bool isnan (double d) noexcept
 
constexpr bool isnan (long double d) noexcept
 
constexpr bool isnan (float d) noexcept
 

Detailed Description

For std functions that are changed somehow

Function Documentation

◆ abs()

template<class T >
constexpr T nonstd::abs ( x)
constexprnoexcept

abs(x) returns |x| using -x if x < 0 or x otherwise

Reason to re-implement: std::abs(x) is not officially constexpr

Parameters
[in]xAny real value type
Returns
|x|

Definition at line 13 of file nonstd.h.

Referenced by Interpolation::min_cyclic().

◆ isdigit()

constexpr int nonstd::isdigit ( int  ch)
constexprnoexcept

Checks if the given character in 0123456789.

Reason to re-implement: std::isdigit(ch) is not officially constexpr

The int-interface is kept from the standard

Parameters
[in]chA character
Returns
int from a simple boolean.

Definition at line 24 of file nonstd.h.

Referenced by Species::is_predefined_model(), ArtsParser::parse_intvector_from_string(), ArtsParser::parse_numvector_from_string(), ArtsParser::read_integer(), and ArtsParser::read_numeric().

◆ isnan() [1/3]

◆ isnan() [2/3]

constexpr bool nonstd::isnan ( float  d)
constexprnoexcept

Definition at line 41 of file nonstd.h.

References d.

◆ isnan() [3/3]

constexpr bool nonstd::isnan ( long double  d)
constexprnoexcept

Definition at line 40 of file nonstd.h.

References d.