E.V.E
v2023.02.15
Loading...
Searching...
No Matches

◆ am

auto eve::am = functor<am_t>
inlineconstexpr

External references

Example

// revision 1
#include <eve/module/elliptic.hpp>
#include <iostream>
eve::wide wf{1.0, 0.0, 0.75, 0.5};
eve::wide wphi{1.0, 1.0e-30, 0.5, 0.0};
int main(){
std::cout << "<- wf = " << wf << "\n";
std::cout << "<- wphi = " << wphi << "\n";
std::cout << "-> am(wphi, wf) = " << eve::am(wphi, wf) << "\n";
std::cout << "-> am[ignore_last(2)](wphi,wf)= " << eve::am[eve::ignore_last(2)](wphi, wf) << "\n";
std::cout << "-> am[wf != 1.0](wphi,wf) = " << eve::am[wf != -1.0f](wphi, wf) << "\n";
std::cout << "-> am(pio_2[lower], wf) = " << eve::am(eve::pio_2[eve::lower](eve::as(wphi)), wf) << '\n';
std::cout << "-> am(pio_2[upper], wf) = " << eve::am(eve::pio_2[eve::upper](eve::as(wphi)), wf) << '\n';
}
constexpr auto lower
Guarantees a result no greater than the exact mathematical one.
Definition core.hpp:103
constexpr auto upper
Guarantees a result no smaller than the exact mathematical one.
Definition core.hpp:102
constexpr auto am
elementwise_callable object computing the Jacobi's Amplitude function.
Definition am.hpp:98
constexpr auto pio_2
Callable object computing the constant .
Definition pio_2.hpp:76
Lightweight type-wrapper.
Definition as.hpp:29
Conditional expression ignoring the k last lanes from a eve::simd_value.
Definition conditional.hpp:361
Wrapper for SIMD registers.
Definition wide.hpp:94

Header file

#include <eve/module/elliptic.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto am(floating_value auto u, floating_value auto x) noexcept; // 1
//Semantic modifiers
constexpr auto am[modular](floating_value auto u, floating_value auto alpha) noexcept; // 1
constexpr auto am[eccentric(floating_value auto u, floating_value auto k) noexcept; // 1
constexpr auto am[threshold = tol](floating_value auto u, floating_value auto x) noexcept;// 3
// Lanes masking
constexpr auto am[conditional_expr auto c](/*any of the above overloads*/) noexcept; // 2
constexpr auto am[logical_value autolm](/*any of the above overloads*/) noexcept; // 2
}
Specifies that a type is a Conditional Expression.
Definition conditional.hpp:28
The concept floating_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition value.hpp:116
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition value.hpp:134
EVE Main Namespace.
Definition abi.hpp:19

Parameters

  • u: argument.
  • x: amplitude parameter ( \(0\le m\le 1\)).
  • alpha: modular angle given in radian (modular option).
  • m : elliptic modulus or eccentricity (eccentric option).
  • c: Conditional expression masking the operation.
  • l: Logical value masking the operation.

Return value

  1. return the jacobian amplitude function. Take care that the meaning of the second parameters depends on the option used (see note below).
  2. The operation is performed conditionally
  3. a threshold can be given controlling the needed accuracy.
Note
  • \(\alpha\) is named the modular angle given in radian (modular option).
  • \( k = \sin\alpha \) is named the elliptic modulus or eccentricity (eccentric option).
  • \( m = k^2 = \sin^2\alpha\) is named the parameter (no option). Each of the above three quantities is completely determined by any of the others (given that they are non-negative). Thus, they can be used interchangeably (give the right option).