text: //==================================================================================================
  /*
    EVE - Expressive Vector Engine
    Copyright : EVE Contributors & Maintainers
    SPDX-License-Identifier: MIT
  */
  //==================================================================================================
  #pragma once
  
  #include <eve/module/core/decorator/roundings.hpp>
  #include <eve/concept/value.hpp>
  #include <eve/detail/implementation.hpp>
  #include <eve/traits/as_integer.hpp>
  #include <eve/as.hpp>
  #include <type_traits>
  
  namespace eve
  {
    //================================================================================================
    //! @addtogroup core
    //! @{
    //! @var maxexponentp1
    //!
    //! @brief Callable object computing the greatest exponent value plus one.
    //!
    //! **Required header:** `#include <eve/module/core.hpp>`
    //!
    //! | Member       | Effect                                                     |
    //! |:-------------|:-----------------------------------------------------------|
    //! | `operator()` | Computes the maxexponentp1 constant                               |
    //!
    //! ---
    //!
    //!  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
    //!  template < floating_real_value T > auto operator()( as<T> const & t) const noexcept;
    //!  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //!
    //! **Parameters**
    //!
    //!`t`:   [Type wrapper](@ref eve::as) instance embedding the type of the constant.
    //!
    //! **Return value**
    //!
    //! the call `eve::maxexponentp1(as<T>())` is semantically equivalent to
    //!   - as_integer_t<T>(128) if eve::element_type_t<T> is float
    //!   - as_integer_t<T>(1024) if eve::element_type_t<T> is double
    //!
    //! ---
    //!
    //! #### Example
    //!
    //! @godbolt{doc/core/maxexponentp1.cpp}
    //!
    //! @}
    //================================================================================================
    EVE_MAKE_CALLABLE(maxexponentp1_, maxexponentp1);
  
    namespace detail
    {
      template<floating_value T>
      EVE_FORCEINLINE constexpr auto maxexponentp1_(EVE_SUPPORTS(cpu_), as<T> const &) noexcept
      {
        using t_t = element_type_t<T>;
        using i_t = as_integer_t<T>;
  
        if constexpr(std::is_same_v<t_t, float>) return i_t(128);
        else if constexpr(std::is_same_v<t_t, double >) return i_t(1024);
      }
  
      template<typename T, typename D>
      EVE_FORCEINLINE constexpr auto maxexponentp1_(EVE_SUPPORTS(cpu_), D const &, as<T> const &) noexcept
      requires(is_one_of<D>(types<upward_type, downward_type> {}))
      {
        return maxexponentp1(as<T>());
      }
    }
  }
  