std::numeric_limits::denorm_min
Da cppreference.com.
|
|
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
<metanoindex/>
<tbody> </tbody> static T denorm_min() |
(fino al c++11) | |
static constexpr T denorm_min() |
(dal C++11) | |
Restituisce il minimo valore subnormale positivo del
T tipo, se std::numeric_limits<T>::has_denorm != std::denorm_absent, altrimenti restituisce std::numeric_limits<T>::min(). Significativo solo per i tipi a virgola mobile.Original:
Returns the minimum positive valore subnormale of the type
T, if std::numeric_limits<T>::has_denorm != std::denorm_absent, otherwise returns std::numeric_limits<T>::min(). Only meaningful for floating-point types.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Valore di ritorno
T
|
std::numeric_limits<T>::denorm_min()
|
| /* non-specialized */ | T();
|
bool
|
false
|
char
|
0
|
signed char
|
0
|
unsigned char
|
0
|
wchar_t
|
0
|
char16_t
|
0
|
char32_t
|
0
|
short
|
0
|
unsigned short
|
0
|
int
|
0
|
unsigned int
|
0
|
long
|
0
|
unsigned long
|
0
|
long long
|
0
|
unsigned long long
|
0
|
float
|
2-149 if std::numeric_limits<float>::is_iec559 == true
|
double
|
2-1074 if std::numeric_limits<double>::is_iec559 == true
|
long double
|
/ * Implementazione definito * /
Original: /* implementation-defined */ The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Eccezioni
Esempio
Demonstates la struttura sottostante bit del denorm_min ()
Original:
Demonstates the underlying bit structure of the denorm_min()
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
#include <cstdint>
#include <limits>
#include <cassert>
int main()
{
// the smallest subnormal value has sign bit = 0, exponent = 0
// and only the least significant bit of the fraction is 1
uint32_t denorm_bits = 0x0001;
float denorm_float = reinterpret_cast<float&>(denorm_bits);
assert(denorm_float == std::numeric_limits<float>::denorm_min());
}
Vedi anche
[statico] |
restituisce il più piccolo valore finito del tipo specificato Original: returns the smallest finite value of the given type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (metodo pubblico statico) |
[statico] |
identifica lo stile denormalizzazione utilizzato dal tipo a virgola mobile Original: identifies the denormalization style used by the floating-point type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (pubblico membro statico costante) |
[statico] (C++11) |
restituisce il valore più basso finito del tipo specificato Original: returns the lowest finite value of the given type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (metodo pubblico statico) |