◆ geommean
Callable object computing the mid-point operation. Parameters
Return value For two parameters \(\sqrt{xy}\). No overflow occurs. For more than two parameters \(\sqrt[n]{x_1x_2...x_n}\) The result type is the common compatible type of the parameters.
auto operator[]( conditional_expression auto cond ) const noexcept;
Higher-order function generating a masked version of eve::geommean Parameters
Return value A Callable object so that the expression Supported decorators
ExampleSee it live on Compiler Explorer #include <eve/function/geommean.hpp>
#include <eve/literals.hpp>
#include <eve/wide.hpp>
#include <vector>
#include <iostream>
int main()
{
using w_t = eve::wide<double, eve::fixed<4>>;
w_t pi = {3, 2, 3, -3}, qi = {4, 2, 1, -100};
std::cout << "---- simd" << '\n'
<< " <- qi = " << qi << '\n'
float xi = 3, yi = 4;
std::cout << "---- scalar" << '\n'
<< " xi = " << xi << '\n'
<< " yi = " << yi << '\n'
w_t pf = {3, 1, -3, -10}, qf = {4, 1, 1, 15};;
std::cout << "---- multi" << '\n'
<< " <- pf = " << pf << '\n'
<< " <- qf = " << qf << '\n'
return 0;
}
constexpr callable_geommean_ geommean Callable object computing the mid-point operation. Definition: geommean.hpp:90 Required header: Members Functions
Definition: value.hpp:83 |