#pragma once namespace gp { namespace math { template constexpr T pi; template T abs(T); template word_t log2(word_t v); /** * @brief Returns \f$n\f$ so that it is the smallest value that matches for \f$v\leq{}log2(2^n)\f$ * * @tparam word_t * @param v * @return constexpr word_t */ template constexpr word_t msb(word_t v); /** * @brief Reads the sign of a value * * @tparam T * @return -1 if the value is negative * @return 0 if the value is 0 or not a number * @return 1 if the value is positive */ template T sign(T); } }