◆ sqrt
Callable object computing the square root. Required header: Members Functions
Definition: value.hpp:83 Parameters
Return value Returns the elementwise square root of the input. auto operator[]( conditional_expression auto cond ) const noexcept;
Higher-order function generating a masked version of eve::sqrt Parameters
Return value A Callable object so that the expression Supported decorators
ExampleSee it live on Compiler Explorer #include <eve/function/sqrt.hpp>
#include <eve/constant/inf.hpp>
#include <eve/wide.hpp>
#include <iostream>
using wide_ft = eve::wide<float, eve::fixed<4>>;
int main()
{
wide_ft pf = {1.0f, 2.0f, -3.0f, eve::inf(eve::as<float>())};
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
float xf = 32.768f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
return 0;
}
constexpr callable_sqrt_ sqrt Callable object computing the square root. Definition: sqrt.hpp:98 constexpr callable_inf_ inf Callable object computing the infinity ieee value. Definition: inf.hpp:54 constexpr raw_type const raw Higher-order Callable Object imbuing quick and dirty behaviour onto other Callable Objects. Definition: raw.hpp:43 |