MSTL 1.4.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
numeric_types.hpp 文件参考

MSTL数值类型特性检查 更多...

numeric_types.hpp 的引用(Include)关系图:

浏览该文件的源代码.

函数

template<typename T, enable_if_t< is_floating_point_v< T >, int > = 0>
MSTL_CONST_FUNCTION constexpr bool signbit (const T x) noexcept
 获取浮点数的符号位
template<typename T, enable_if_t< is_floating_point_v< T >, int > = 0>
MSTL_CONST_FUNCTION constexpr bool is_nan (const T x) noexcept
 检查浮点数是否为NaN
template<typename T, enable_if_t< is_floating_point_v< T >, int > = 0>
MSTL_CONST_FUNCTION constexpr bool is_pos_infinity (const T x) noexcept
 检查浮点数是否为正无穷大
template<typename T, enable_if_t< is_floating_point_v< T >, int > = 0>
MSTL_CONST_FUNCTION constexpr bool is_neg_infinity (const T x) noexcept
 检查浮点数是否为负无穷大
template<typename T, enable_if_t< is_floating_point_v< T >, int > = 0>
MSTL_CONST_FUNCTION constexpr bool is_infinity (const T x) noexcept
 检查浮点数是否为无穷大
template<typename T, enable_if_t< is_floating_point_v< T >, int > = 0>
MSTL_CONST_FUNCTION constexpr bool is_finite (const T x) noexcept
 检查浮点数是否为有限值
template<typename T, enable_if_t< is_floating_point_v< T >, int > = 0>
MSTL_CONST_FUNCTION constexpr bool is_normal (const T x) noexcept
 检查浮点数是否为正规数
template<typename T, enable_if_t< is_floating_point_v< T >, int > = 0>
MSTL_CONST_FUNCTION constexpr bool is_subnormal (const T x) noexcept
 检查浮点数是否为次正规数
template<typename T, enable_if_t< is_floating_point_v< T >, int > = 0>
MSTL_CONST_FUNCTION constexpr bool is_positive (const T x) noexcept
 检查浮点数是否为正数
template<typename T, enable_if_t< is_floating_point_v< T >, int > = 0>
MSTL_CONST_FUNCTION constexpr bool is_negative (const T x) noexcept
 检查浮点数是否为负数

详细描述

MSTL数值类型特性检查

此文件提供了浮点数特性检查函数实现, 包括符号位检测、特殊值判断、正规性检查等功能。

在文件 numeric_types.hpp 中定义.