10 #ifndef ECL_CORE_MATH_SIMPLE_HPP_ 11 #define ECL_CORE_MATH_SIMPLE_HPP_ 37 template <
typename Scalar>
38 inline int sign(
const Scalar &x) {
60 template <
typename Scalar>
61 inline int psign(
const Scalar &x) {
79 template <
typename Scalar>
80 inline int nsign(
const Scalar &x) {
96 template <
typename Scalar>
99 return psign(x)*pow(fabs(x),1.0/3.0);
Embedded control libraries.
int sign(const Scalar &x)
A sign function for numerical values.
int psign(const Scalar &x)
A sign function for numerical values (positive return if arg is zero).
Scalar cube_root(const Scalar &x)
The real solution to a cube root.
int nsign(const Scalar &x)
A sign function for numerical values (negative return if arg is zero).