Callable object computing the logspace_sub operation: \(\log\left(e^{x_0}-\sum_{i = 1}^n e^{x_i}\right)\).
Defined in Header
#include <eve/module/math.hpp>
{
}
constexpr callable_logspace_sub_ logspace_sub
Callable object computing the logspace_sub operation: .
Definition: logspace_sub.hpp:54
Definition: all_of.hpp:22
Parameters
arg0
, arg1
, args
, ...: values.
Return value
The call logspace_sub(arg0, arg1, args...)
is semantically equivalent to log(exp(arg0) - exp(arg1) - exp(args)...)
.
The result type is the common compatible type of the parameters.
#include <eve/module/math.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
w_t pf = {3, 2, 3, 3}, qf = {4, 1, 1, ~0};
std::cout << "---- simd" << '\n'
<< " <- pf = " << pf << '\n'
<< " <- qf = " << qf << '\n'
;
float xi = 3, yi = 4;
std::cout << "---- scalar" << '\n'
<< " xi = " << xi << '\n'
<< " yi = " << yi << '\n'
return 0;
}
Wrapper for SIMD registers.
Definition: wide.hpp:65