MSTL 1.4.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
数学常量

常用数学常量定义 更多...

变量

MSTL_INLINE17 constexpr decimal_t EULER = 2.718281828459045L
 自然常数 e
MSTL_INLINE17 constexpr decimal_t PI = 3.141592653589793L
 圆周率 π(弧度制)
MSTL_INLINE17 constexpr decimal_t PHI = 1.618033988749895L
 黄金分割比 φ
MSTL_INLINE17 constexpr decimal_t SEMI_CIRCLE = 180.0
 半圆角度 180°(角度制)
MSTL_INLINE17 constexpr decimal_t CIRCLE = 360.0
 全圆角度 360°(角度制)
MSTL_INLINE17 constexpr decimal_t EPSILON = 1e-15L
 浮点数精度容差
MSTL_INLINE17 constexpr uint32_t TAYLOR_CONVERGENCE = 10000U
 泰勒展开收敛项数
MSTL_INLINE17 constexpr decimal_t PRECISE_TOLERANCE = TAYLOR_CONVERGENCE * EPSILON
 精确容差
MSTL_INLINE17 constexpr decimal_t LOW_PRECISE_TOLERANCE = TAYLOR_CONVERGENCE * PRECISE_TOLERANCE
 低精度容差
MSTL_INLINE17 constexpr uint64_t FIBONACCI_LIST []
 预计算的斐波那契数列
MSTL_INLINE17 constexpr uint32_t FIBONACCI_COUNT = extent_v<decltype(FIBONACCI_LIST)>
 斐波那契数列预计算数量

详细描述

常用数学常量定义

变量说明

◆ FIBONACCI_LIST

MSTL_INLINE17 constexpr uint64_t FIBONACCI_LIST[]
constexpr
初始值:
= {
0, 1, 1, 2, 3,
5, 8, 13, 21, 34,
55, 89, 144, 233, 377,
610, 987, 1597, 2584, 4181,
6765, 10946, 17711, 28657, 46368,
75025, 121393, 196418, 317811, 514229,
832040, 1346269, 2178309, 3524578, 5702887,
9227465, 14930352, 24157817, 39088169, 63245986,
102334155, 165580141, 267914296, 433494437, 701408733,
1134903170, 1836311903, 2971215073, 4807526976, 7778742049
}

预计算的斐波那契数列

包含前50个斐波那契数,用于快速查找。

在文件 math.hpp41 行定义.

被这些函数引用 fibonacci().