Computes the nth Bernouilli number \(b_n\) as a double.
{
template< eve::unsigned_value N >
eve::as_wide_as<double, N>
bernouilli(N n)
noexcept;
}
constexpr callable_bernouilli_ bernouilli
Computes the nth Bernouilli number as a double.
Definition: bernouilli.hpp:57
Definition: all_of.hpp:22
The value of the nth Bernouilli number is returned. The result's element type is double to avoid overflow and its cardinal is the same as 'n'.
#include <eve/module/combinatorial.hpp>
#include <eve/wide.hpp>
#include <iomanip>
#include <iostream>
int
main()
{
w32_t pi32 = {93, 25, 32, 180, 1, 2, 3, 4};
std::cout << "---- simd" << std::setprecision(17) << '\n'
<< " <- pi32 = " << pi32 << '\n'
std::uint32_t xi = 18;
std::cout << "---- scalar" << '\n'
<< " xi = " << xi << '\n'
return 0;
}
Wrapper for SIMD registers.
Definition: wide.hpp:65