|
template<arithmetic_type T> |
constexpr bool | isNaN (const T &v) noexcept |
|
template<basic_type T> |
constexpr bool | isInf (const T &v) noexcept |
|
template<arithmetic_type T>
requires (!has_inf<T>) |
constexpr bool | isInf (const T &) noexcept |
|
template<arithmetic_type T> |
constexpr bool | is_negative (const T &x) noexcept |
|
template<typename T = void, typename Arg_t = void> |
constexpr auto | copy_as_negative (Arg_t x, bool negative=1) noexcept |
|
template<arithmetic_type T> |
constexpr auto | reverse_sign (const T &x) noexcept |
|
template<arithmetic_type T> |
constexpr auto | reverse_sign_if (bool x, const T &y) noexcept |
|
template<basic_float_type T> |
constexpr auto | reciprocal (const T &x) noexcept |
|
template<arithmetic_type T, arithmetic_type U> |
constexpr T | safe_arithmetic_cast (U x) noexcept |
|
template<arithmetic_type T> |
constexpr size_t | to_size_t (T x) noexcept |
|
template<arithmetic_type T> |
constexpr uintmax_t | to_uintmax_t (T x) noexcept |
|
template<arithmetic_type T1, arithmetic_type T2> |
constexpr auto | mod (const T1 &a, const T2 &b) |
|
template<arithmetic_type T> |
constexpr bool | is_odd (const T &x) noexcept |
|
template<arithmetic_type T> |
constexpr bool | is_even (const T &x) noexcept |
|
template<arithmetic_type T1, arithmetic_type T2>
requires (!is_big_type<T1>&&!is_big_type<T2>) |
constexpr auto | divmod (const T1 &a, const T2 &b) |
|
template<arithmetic_type T, arithmetic_type U> |
constexpr auto | ceil_div (const T &a, const U &b) noexcept |
|
template<typename T > |
constexpr void | set_rounding (int mode) |
|
template<typename T > |
constexpr int | get_rounding () |
|
template<arithmetic_type T> |
constexpr auto | abs (const T &v) noexcept |
|
template<arithmetic_type T> |
constexpr bool | is_close (const T &a, const T &b) noexcept |
|
template<arithmetic_type T1, arithmetic_type T2> |
constexpr auto | sub (const T1 &a, const T2 &b) noexcept |
|
template<float_type T> |
constexpr T | exp (const T &v) noexcept |
|
template<arithmetic_type T> |
constexpr auto | log (const T &a) noexcept |
|
template<arithmetic_type T, arithmetic_type U> |
constexpr auto | log (const T &a, const U &b) noexcept |
|
template<unsigned_integer_type T> |
constexpr size_t | integer_log (const T &a, const auto &b) noexcept |
|
template<arithmetic_type T, arithmetic_type U = unsigned>
requires (!is_big_type<T>) |
constexpr auto | pow (const T &a, const U &b=2) noexcept |
|
template<big_type T, unsigned_integer_type U = unsigned> |
constexpr auto | pow (T a, U b=2) noexcept |
|
template<float_type T>
requires is_basic_type<T> |
constexpr auto | trunc (const T &v) noexcept |
|
template<float_type T>
requires is_basic_type<T> |
constexpr auto | ceil (const T &v) noexcept |
|
template<float_type T>
requires is_basic_type<T> |
constexpr auto | floor (const T &v) noexcept |
|
template<float_type T>
requires (has_ε<T>) |
constexpr T | invsqrt (const T &v) noexcept |
|
template<float_type T, arithmetic_type U = T> |
constexpr T | invsqrt_iteration (const T &num, const U &v) noexcept |
|
template<float_type T, arithmetic_type U = T> |
constexpr T | invsqrt_to_new_ε (T num, const U &v, const to_unsigned_t< T > &ε, to_unsigned_t< T > &ε_saver) noexcept |
|
template<float_type T> |
constexpr T | quick_invsqrt (const T &v) noexcept |
|
template<float_type T> |
constexpr T | invsqrt (const T &v, const to_unsigned_t< T > &ε, to_unsigned_t< T > &ε_saver) noexcept |
|
template<float_type T> |
constexpr T | invsqrt (const T &v, const to_unsigned_t< T > &ε) noexcept |
|
template<integer_type T> |
constexpr auto | invsqrt (const T &v) noexcept |
|
template<float_type T>
requires (has_ε<T>) |
constexpr T | sqrt (const T &v) noexcept |
|
template<float_type T, arithmetic_type U = T> |
constexpr T | sqrt_iteration (const T &num, const U &v) noexcept |
|
template<float_type T, arithmetic_type U = T> |
constexpr T | sqrt_to_new_ε (T num, const U &v, const to_unsigned_t< T > &ε, to_unsigned_t< T > &ε_saver) noexcept |
|
template<float_type T, arithmetic_type U = T> |
constexpr T | sqrt_to_new_ε (T num, const U &v, const to_unsigned_t< T > &ε) noexcept |
|
template<float_type T> |
constexpr T | quick_sqrt (const T &v) noexcept |
|
template<float_type T> |
constexpr T | sqrt (const T &v, const to_unsigned_t< T > &ε, to_unsigned_t< T > &ε_saver) noexcept |
|
template<float_type T> |
constexpr T | sqrt (const T &v, const to_unsigned_t< T > &ε) noexcept |
|
template<integer_type T> |
constexpr auto | sqrt (const T &v) noexcept |
|
template<arithmetic_type T> |
constexpr bool | is_prime_num_no_pre_check (T a) noexcept |
|
template<arithmetic_type T> |
constexpr bool | is_prime_num (T a) noexcept |
|
template<arithmetic_type T> |
constexpr T | get_prime_num_less_or_eq_than (T a) noexcept |
| 求小于或等于某数的素数
|
|
template<arithmetic_type T> |
constexpr T | get_prime_num_big_or_eq_than (T a) noexcept |
| 求大于或等于某数的素数
|
|
template<arithmetic_type T> |
constexpr auto | get_prime_num_big_than (T a) noexcept |
| 求大于某数的素数
|
|
template<unsigned_integer_type size_T> |
constexpr size_T | get_next_gold_size_to_resize_for_array (size_T size) noexcept |
| 已知当前array的size,求下一个合适的提前分配大小
|
|
template<unsigned_integer_type size_T> |
constexpr size_T | get_next_gold_size_to_resize_for_hash (size_T size) noexcept |
| 已知当前hash table的size,求下一个合适的桶大小
|
|
template<unsigned_integer_type T> |
constexpr auto | factorial (unsigned n, unsigned start=1u) noexcept |
|
template<integer_type T> |
auto | binary_gcd (T x, T y) noexcept |
|
template<integer_type T> |
auto | euclidean_gcd (T x, T y) noexcept |
|
template<integer_type T> |
auto | base_gcd (T x, T y) noexcept |
|
template<unsigned_big_integer_type T> |
auto | lehmer_gcd (T x, T y) noexcept |
|
template<integer_type T> |
auto | gcd (T x, T y) noexcept |
|
template<signed_float_type T> |
constexpr T | sin (T num, const to_unsigned_t< T > &ε) noexcept |
|
template<signed_float_type T>
requires (has_ε<T>) |
constexpr T | sin (T num) noexcept |
|
template<float_type T> |
constexpr T | arctan (T num, const to_unsigned_t< T > &ε) noexcept |
|
template<float_type T>
requires (has_ε<T>) |
constexpr T | arctan (T num) noexcept |
|
template<signed_float_type T> |
constexpr T | cos (T num, const to_unsigned_t< T > &ε) noexcept |
|
template<signed_float_type T>
requires (has_ε<T>) |
constexpr T | cos (T num) noexcept |
|
template<signed_float_type T> |
constexpr T | tan (T num, const to_unsigned_t< T > &ε) noexcept |
|
template<signed_float_type T>
requires (has_ε<T>) |
constexpr T | tan (T num) noexcept |
|
template<signed_float_type T> |
constexpr T | cot (T num, const to_unsigned_t< T > &ε) noexcept |
|
template<signed_float_type T>
requires (has_ε<T>) |
constexpr T | cot (T num) noexcept |
|
template<signed_float_type T> |
constexpr T | sec (T num, const to_unsigned_t< T > &ε) noexcept |
|
template<signed_float_type T>
requires (has_ε<T>) |
constexpr T | sec (T num) noexcept |
|
template<signed_float_type T> |
constexpr T | csc (T num, const to_unsigned_t< T > &ε) noexcept |
|
template<signed_float_type T>
requires (has_ε<T>) |
constexpr T | csc (T num) noexcept |
|
template<signed_float_type T> |
constexpr to_unsigned_t< T > | arccos (T num, const to_unsigned_t< T > &ε) noexcept |
|
template<signed_float_type T>
requires (has_ε<T>) |
constexpr to_unsigned_t< T > | arccos (T num) noexcept |
|
template<float_type T> |
constexpr T | arcsin (T num, const to_unsigned_t< T > &ε) noexcept |
|
template<float_type T>
requires (has_ε<T>) |
constexpr T | arcsin (T num) noexcept |
|
template<signed_float_type T> |
constexpr to_unsigned_t< T > | arccot (T num, const to_unsigned_t< T > &ε) noexcept |
|
template<signed_float_type T>
requires (has_ε<T>) |
constexpr to_unsigned_t< T > | arccot (T num) noexcept |
|
template<signed_float_type T> |
constexpr T | arcsec (T num, const to_unsigned_t< T > &ε) noexcept |
|
template<signed_float_type T>
requires (has_ε<T>) |
constexpr T | arcsec (T num) noexcept |
|
template<float_type T> |
constexpr T | arccsc (T num, const to_unsigned_t< T > &ε) noexcept |
|
template<float_type T>
requires (has_ε<T>) |
constexpr T | arccsc (T num) noexcept |
|