OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
Functions
matheval::detail::math Namespace Reference

Functions

template<typename T >
constexpr T sgn (T x)
 Sign function.
 
template<typename T >
isnan (T x)
 isnan function with adjusted return type
 
template<typename T >
isinf (T x)
 isinf function with adjusted return type
 
template<typename T >
constexpr T deg (T x)
 Convert radians to degrees.
 
template<typename T >
constexpr T rad (T x)
 Convert degrees to radians.
 

Function Documentation

◆ deg()

template<typename T >
constexpr T matheval::detail::math::deg ( x)
inlineconstexpr

Convert radians to degrees.

Definition at line 78 of file matheval.hpp.

References Units::rad2deg.

◆ isinf()

template<typename T >
T matheval::detail::math::isinf ( x)

isinf function with adjusted return type

Definition at line 74 of file matheval.hpp.

◆ isnan()

template<typename T >
T matheval::detail::math::isnan ( x)

isnan function with adjusted return type

Definition at line 70 of file matheval.hpp.

◆ rad()

template<typename T >
constexpr T matheval::detail::math::rad ( x)
inlineconstexpr

Convert degrees to radians.

Definition at line 82 of file matheval.hpp.

References Units::deg2rad.

◆ sgn()

template<typename T >
constexpr T matheval::detail::math::sgn ( x)
constexpr

Sign function.

Missing function in the STL. This calculates the mathematical sign function.

\[ \mathop{\mathrm{sgn}}(x) = \begin{cases} 1 & x > 0 \\ 0 & x = 0 \\ -1 & x < 0 \\ \end{cases} \]

Parameters
[in]xnumber
Returns
the sign of x

Definition at line 66 of file matheval.hpp.