std::numeric_limits<T>::has_denorm

来自cppreference.com
 
 
 
 
 
static const std::float_denorm_style has_denorm;
(C++11 前)
static constexpr std::float_denorm_style has_denorm;
(C++11 起)
(C++23 弃用)

std::numeric_limits<T>::has_denorm 的值鉴别浮点数类型是否支持非正规值

标准特化

Tstd::numeric_limits<T>::has_denorm 的值
/* 未特化 */std::denorm_absent
boolstd::denorm_absent
charstd::denorm_absent
signed charstd::denorm_absent
unsigned charstd::denorm_absent
wchar_tstd::denorm_absent
char8_t (C++20 起)std::denorm_absent
char16_t (C++11 起)std::denorm_absent
char32_t (C++11 起)std::denorm_absent
shortstd::denorm_absent
unsigned shortstd::denorm_absent
intstd::denorm_absent
unsigned intstd::denorm_absent
longstd::denorm_absent
unsigned longstd::denorm_absent
long long (C++11 起)std::denorm_absent
unsigned long long (C++11 起)std::denorm_absent
float通常是 std::denorm_present
double通常是 std::denorm_present
long double通常是 std::denorm_present

参阅

[静态]
返回给定浮点数类型的最小正非正规值
(公开静态成员函数)
指示浮点数非规格化模式
(枚举)