E.V.E
v2023.02.15
Loading...
Searching...
No Matches
◆
sph_bessel_j1
auto eve::sph_bessel_j1 =
functor
<sph_bessel_j1_t>
inline
constexpr
Header file
#include <eve/module/bessel.hpp>
Callable Signatures
namespace
eve
{
// Regular overload
constexpr
auto
sph_bessel_j1
(
floating_value
auto
x) ->
decltype
(x)
noexcept
;
// 1
// Lanes masking
constexpr
auto
sph_bessel_j1
[
conditional_expr
auto
c](
floating_value
auto
x)
noexcept
;
// 2
constexpr
auto
sph_bessel_j1
[
logical_value
auto
m](
floating_value
auto
x)
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:132
eve::sph_bessel_j1
constexpr auto sph_bessel_j1
Computes the spherical Bessel function of the first kind of order 1,.
Definition
sph_bessel_j1.hpp:73
eve
EVE Main Namespace.
Definition
abi.hpp:18
Parameters
x
: positive
floating argument
.
c
:
Conditional expression
masking the operation.
m
:
Logical value
masking the operation.
Return value
The value of \( \displaystyle j_{1}(x)= \frac{\sin x}{x^2}- \frac{\cos x}{x}\) is returned.
The operation is performed conditionnaly
.
External references
Wikipedia: Spherical Bessel Functions
Wolfram Mathwold: Spherical Bessel Function of the First Kind
DLMF: Spherical Bessel Functions
Example
// revision 1
#include <eve/module/bessel.hpp>
#include <iostream>
eve::wide<double>
wf0([](
auto
i,
auto
c)->
double
{
return
2*(i+c/2);});
eve::wide
wf1{0.5, -1.5, 0.1, -1.0, 19.0, 25.0, 21.5, 10000.0};
int
main()
{
std::cout <<
"<- wf0 = "
<< wf0 <<
"\n"
;
std::cout <<
"<- wf1 = "
<< wf1 <<
"\n"
;
std::cout <<
"-> sph_bessel_j1(wf0) = "
<<
eve::sph_bessel_j1
(wf0) <<
"\n"
;
std::cout <<
"-> sph_bessel_j1[ignore_last(2)](wf0)= "
<<
eve::sph_bessel_j1
[
eve::ignore_last
(2)](wf0) <<
"\n"
;
std::cout <<
"-> sph_bessel_j1[wf0!= 6.0f](wf0) = "
<<
eve::sph_bessel_j1
[wf0!= 6.0f](wf0) <<
"\n"
;
std::cout <<
"-> sph_bessel_j1(wf1) = "
<<
eve::sph_bessel_j1
(wf1) <<
"\n"
;
}
eve::ignore_last
Conditional expression ignoring the k last lanes from a eve::simd_value.
Definition
conditional.hpp:332
eve::wide
Wrapper for SIMD registers.
Definition
wide.hpp:70
eve