Computing max t such that tanh(pi*sinh(t)/2) <1
I don't have any suggestions for making the code faster (other than pre-computing at compile-time, which I assume isn't an option for you), but I do have some general observations on the code style.

Instead of bringing definitions of the std and boost names at global scope, they can be isolated in the functions that use them (still with using, so ADL will continue to work the same as in the original code):

#include &lt;cmath&gt;
#include &lt;boost/math/constants/constants.hpp&gt;

template&lt;class Real&gt;
Real g(Real t)
{
    using std::tanh;
    using std::sinh;
    using boost::math::constants::half_pi;
    Real tmp = half_pi&lt;Real&gt;()*sinh(t);
    return tanh(tmp);
}

template&lt;class Real&gt;
Real g_inv(Real x)
{
    using std::asinh;
    using std::atanh;
    using boost::math::constants::two_div_pi;
    return asinh(two_div_pi&lt;Real&gt;()*atanh(x));
}


Standard C++ provides nexttoward(), which can be used in place of boost::math::float_prior:

template&lt;class Real&gt;
Real find_max_t()
{
    using std::isnormal;
    using std::nexttoward;

    static const Real ONE{1};

    Real x = nexttoward(ONE, 0);
    Real t_max = g_inv(x);
    while (!isnormal(t_max))
    {
        x = float_prior(x);
        t_max = g_inv(x);
    }
    // This occurs once on 100 digit arithmetic:
    while (!(g(t_max) &lt; ONE))
    {
        x = nexttoward(x, 0);
        t_max = g_inv(x);
    }
    return t_max;
}


Unfortunately, the Boost numeric types don't provide any nexttoward(), so you may be stuck using boost::math::float_prior after all.  :-(

The benchmark code can now be separable:

#include &lt;iostream&gt;
#include &lt;benchmark/benchmark.h&gt;

template&lt;class Real&gt;
static void BM_max_t(benchmark::State&amp; state)
{
    Real t_max;
    while(state.KeepRunning())
    {
        benchmark::DoNotOptimize(t_max = find_max_t&lt;Real&gt;());
    }
    std::cout &lt;&lt; "t_max = " &lt;&lt; t_max &lt;&lt; std::endl;
}


#include &lt;boost/multiprecision/float128.hpp&gt;
#include &lt;boost/multiprecision/cpp_bin_float.hpp&gt;
BENCHMARK_TEMPLATE(BM_max_t, float);
BENCHMARK_TEMPLATE(BM_max_t, double);
BENCHMARK_TEMPLATE(BM_max_t, long double);
BENCHMARK_TEMPLATE(BM_max_t, boost::multiprecision::float128);
BENCHMARK_TEMPLATE(BM_max_t, boost::multiprecision::cpp_bin_float_50);
BENCHMARK_TEMPLATE(BM_max_t, boost::multiprecision::cpp_bin_float_100);

BENCHMARK_MAIN();