kyosu v0.1.0
Complex Without Complexes
Loading...
Searching...
No Matches

◆ omega

auto kyosu::omega = eve::functor<omega_t>
inlineconstexpr

Computes the Wright \(\omega\) the inverse function of \( x \rightarrow \log x+x\).

Header file

#include <eve/module/special.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto omega(complex_like auto x) noexcept; // 1
// Lanes masking
constexpr auto omega[conditional_expr auto c](complex_like auto x) noexcept; // 2
constexpr auto omega[logical_value auto m](complex_like auto x) noexcept; // 2
}
constexpr auto omega
Computes the Wright the inverse function of .
Definition omega.hpp:74

Parameters

  • x: complex_like.
  • c: Conditional expression masking the operation.
  • m: Logical value masking the operation.

Return value

  1. The value of the Wright \(\omega\) function is returned (the inverse function of \( x \rightarrow \log x+x\)) is returned. is the input is a real value a complex value is returned.
  2. The operation is performed conditionnaly.

ω can be used as an alias.

External references

Example

#include <eve/wide.hpp>
#include <iostream>
#include <kyosu/kyosu.hpp>
int main()
{
using wide_ft = eve::wide<float, eve::fixed<4>>;
wide_ft ref1 = {3.0f, 2.0f, 1.0f, 0.5f};
wide_ft imf1 = {2.0f, -1.0, -5.0, 0.0};
wide_ft r = {0.0, 1.0, -2.0, 3.0};
auto zc = kyosu::complex_t<wide_ft>(ref1, imf1);
std::cout << "---- simd" << std::endl
<< "<- zc = " << zc << std::endl
<< "<- r = " << r << std::endl
<< "-> omega(zc) = " << kyosu::omega(zc) << std::endl
<< "-> omega(r) = " << kyosu::omega(r) << std::endl;
return 0;
}
as_cayley_dickson_n_t< 2, T > complex_t
Type alias for complex numbers.
Definition complex.hpp:27