9[[gnu::unused]]
static long double phi = 1.6180339887498948482L;
11[[gnu::unused]]
static long double r5 = std::sqrt(5);
14 std::array<std::uint_least64_t, 41> fibs{
16 13, 21, 34, 55, 89, 144, 233,
17 377, 610, 987, 1597, 2584, 4181, 6765,
18 10946, 17711, 28657, 46368, 75025, 121393, 196418,
19 317811, 514229, 832040, 1346269, 2178309, 3524578, 5702887,
20 9227465, 14930352, 24157817, 39088169, 63245986, 102334155};
21 for (
int i{}; i != fibs.size(); ++i) {
constexpr auto fibonacci(int n) noexcept -> U
Compile-time table fibonacci function.
constexpr auto to_unsigned(I x) -> std::make_unsigned_t< I >
Cast integral argument to corresponding unsigned type.
Provides numerical and mathematical utilities.