That's exactly my problem.
namespace std { // declare missing log2, cannot say constexpr: compilererror inline float128_t log2(const float128_t& arg) noexcept { return log2q(arg); } }
There's no conceivable way we can implement that as a constexpr algorithm.
// also not constexpr inline float128_t myfunc(const float128_t& arg) noexcept { // log2_e not available // constexpr float128_t factor = boost::math::constants::log2_e
(); // compiler generates a function call to log2 const float128_t factor = std::log2(boost::math::constants::e
()); return arg*factor; }
log2(e) == 1/log(2)
So:
constexpr float128_t log2_e = 1 /
boost::math::constants::ln_two