E.V.E  0.1-beta

◆ pow1p

eve::pow1p = {}
inlineconstexpr

Callable object computing pow1p: \(x^y-1\).

Required header: #include <eve/function/pow1p.hpp>

Members Functions

Member Effect
operator() the computation of pow1p
operator[] Construct a conditional version of current function object

template< floating_real_value T, floating_real_value T> auto operator()( T x, U y ) const noexcept;

Parameters

x, y: floating real value.

Return value

Returns the elementwise power(1+x, y), with good accuracy, even when x is small.


auto operator[]( conditional_expression auto cond ) const noexcept;

Higher-order function generating a masked version of eve::pow1p

Parameters

cond : conditional expression

Return value

A Callable object so that the expression pow1p[cond](x, ...) is equivalent to if_else(cond,pow1p(x, ...),x)


Supported decorators

  • eve::diff, eve::diff_1st, eve::diff_2nd, eve::diff_nth

    Required header: #include <eve/function/diff/pow.hpp>

    The expression diff_1st(pow1p)(x,y) and diff_2nd(pow1p)(x,y) computes the partial derivatives of \(f\), where \(f\) is the function \((x,y) \rightarrow \ (1+x)^y\).

Example

See it live on Compiler Explorer