54template<
typename Type>
55inline Type
sign(Type
const& x, Type
const& y = Type(1))
56{
return( std::copysign(y, x) ); }
67{
return( (x%2) == 1 ); }
78{
return( (x%2) == 0 ); }
89{
return std::hypot(x, y); }
bool isEven(int const &x)
is x an even number ?
bool isOdd(int const &x)
is x a odd number ?
Type sign(Type const &x, Type const &y=Type(1))
template sign value sign(x) * y: Type should be an arithmetic type.
Real norm(Real const &x, Real const &y)
Computation of sqrt(x^2 + y^2) without underflow or overflow.
double Real
STK fundamental type of Real values.
The namespace STK is the main domain space of the Statistical ToolKit project.