◆ exp2
Callable object computing \(2^x\). Required header: Members Functions
Definition: value.hpp:93 Parameters
Return value Returns the elementwise exponential of base 2 of the input. In particular, for floating inputs:
auto operator[]( conditional_expression auto cond ) const noexcept;
Higher-order function generating a masked version of eve::exp2 Parameters
Return value A Callable object so that the expression Supported converters
Supported decorators
ExampleSee it live on Compiler Explorer #include <eve/function/exp2.hpp>
#include <eve/wide.hpp>
#include <eve/constant/inf.hpp>
#include <eve/constant/minf.hpp>
#include <eve/constant/nan.hpp>
#include <iostream>
using wide_ft = eve::wide<float, eve::fixed<8>>;
using wide_it = eve::wide<std::uint32_t, eve::fixed<4>>;
int main()
{
wide_ft pf = {0.0f, -0.0f, -1.0f, 33.0f, 2.0f,
wide_it pi = {0, 2, 8, 33};
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
float xf = 1.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
return 0;
}
constexpr callable_minf_ minf Callable object computing the negative infinity value. Definition: minf.hpp:55 constexpr callable_inf_ inf Callable object computing the infinity ieee value. Definition: inf.hpp:54 constexpr converter_type< float > const float32 convert a eve::real_value to a float32 based eve::floating_real_value. Definition: converter.hpp:133 constexpr converter_type< double > const float64 convert a eve::real_value to a float64 based eve::floating_real_value. Definition: converter.hpp:157 constexpr floating_converter const floating_ convert a eve::real_value to a floating point based eve::floating_real_value of same size. Definition: converter.hpp:433 |