16 #error no need to expose this header to Swig
20 #ifndef BORNAGAIN_BASE_MATH_PRECOMPUTED_H
21 #define BORNAGAIN_BASE_MATH_PRECOMPUTED_H
34 static constexpr
double value = 1.0;
37 template <
template <
size_t>
class F,
size_t...
I>
40 return {F<I>::value...};
48 template <
size_t N,
typename Indices = std::make_index_sequence<N>>
51 return internal::generateArrayHelper<internal::ReciprocalFactorial>(Indices{});
constexpr std::array< double, sizeof...(I)> generateArrayHelper(std::index_sequence< I... >)
Various mathematical functions.
constexpr std::array< double, N > generateReciprocalFactorialArray()
Returns a compile-time generated std::array of reciprocal factorials.
static constexpr double value