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

Functions

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

Function Documentation

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

Convert radians to degrees.

Definition at line 75 of file matheval.hpp.

Referenced by matheval::detail::grammar< real_t, Iterator >::ufunc_::ufunc_(), and OpalDegrader::update().

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

Convert degrees to radians.

Definition at line 79 of file matheval.hpp.

Referenced by Cyclotron::apply(), Vacuum::checkPressure(), and matheval::detail::grammar< real_t, Iterator >::ufunc_::ufunc_().

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

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 63 of file matheval.hpp.

References Attrib::Legacy::Distribution::T.

Referenced by matheval::detail::grammar< real_t, Iterator >::ufunc_::ufunc_().