E.V.E
v2023.02.15
Loading...
Searching...
No Matches
◆
jacobi_elliptic
auto eve::jacobi_elliptic =
functor
<jacobi_elliptic_t>
inline
constexpr
Header file
#include <eve/module/elliptic.hpp>
Callable Signatures
namespace
eve
{
// Regular overload
constexpr
auto
jacobi_elliptic
(
floating_value
auto
u,
floating_value
auto
x)
noexcept
;
// 1
//Semantic modifiers
constexpr
auto
jacobi_elliptic
[modular](
floating_value
auto
u,
floating_value
auto
alpha)
noexcept
;
// 1
constexpr
auto
jacobi_elliptic
[eccentric(
floating_value
auto
u,
floating_value
auto
k)
noexcept
;
// 1
constexpr
auto
jacobi_elliptic
[threshold = tol](
floating_value
auto
u,
floating_value
auto
x)
noexcept
;
// 1
// Lanes masking
constexpr
auto
jacobi_elliptic
[
conditional_expr
auto
c](
/*any of the above overloads*/
)
noexcept
;
// 2
constexpr
auto
jacobi_elliptic
[
logical_value
autolm](
/*any of the above overloads*/
)
noexcept
;
// 2
}
eve::conditional_expr
Specifies that a type is a Conditional Expression.
Definition
conditional.hpp:28
eve::floating_value
The concept floating_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition
value.hpp:116
eve::logical_value
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition
value.hpp:134
eve::jacobi_elliptic
constexpr auto jacobi_elliptic
elementwise_callable object computing the Jacobi's sn, cn and dn function simultaneously.
Definition
jacobi_elliptic.hpp:85
eve
EVE Main Namespace.
Definition
abi.hpp:19
Parameters
u
: argument.
m
: amplitude parameter ( \(0\le m\le 1\)).
c
:
Conditional expression
masking the operation.
l
:
Logical value
masking the operation.
Return value
return a
kumi::tuple
containing
sn``cn
and
dn
values. Take care that the meaning of the second parameters depends on the option used (see note below).
The operation is performed conditionally
External references
DLMF: Jacobian Elliptic
Wolfram MathWorld: Jacobi Elliptic Functions
Wikipedia: Jacobi elliptic functions
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"
;
auto
[sn, cn, dn] =
eve::jacobi_elliptic
(wphi, wf);
std::cout <<
"-> sn = "
<< sn << std::endl;
std::cout <<
"-> cn = "
<< cn << std::endl;
std::cout <<
"-> dn = "
<< dn << std::endl;
std::cout <<
"-> jacobi_elliptic(pio_2[lower], wf) = "
<<
eve::jacobi_elliptic
(
eve::pio_2
[eve::lower](
eve::as
(wphi)), wf) <<
'\n'
;
std::cout <<
"-> jacobi_elliptic(pio_2[upper], wf) = "
<<
eve::jacobi_elliptic
(
eve::pio_2
[eve::upper](
eve::as
(wphi)), wf) <<
'\n'
;
}
eve::pio_2
constexpr auto pio_2
Callable object computing the constant .
Definition
pio_2.hpp:77
eve::as
Lightweight type-wrapper.
Definition
as.hpp:29
eve::wide
Wrapper for SIMD registers.
Definition
wide.hpp:94
eve