Espacios de nombres
Variantes
Acciones

std::numeric_limits::max_digits10

De cppreference.com
 
 
Biblioteca de servicios
 
Apoyo de tipos
Tipos básicos
Tipos fundamentales
Tipos enteros de anchura fija (C++11)
Límites numéricos
Interfaz de C de límites numéricos
Información de tipo
en tiempo de ejecución
Rasgos de tipos
Categorías de tipos
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
Propiedades de tipos
(C++11)
(C++11)
(C++14)
(C++11)
(C++11)(hasta C++20)
(C++11)(en desuso en C++20)
(C++11)
Constantes de rasgos de tipos
Metafunciones
(C++17)
Contexto de evaluación constante
Operaciones soportadas
Relaciones y consultas de propiedades
Modificaciones de tipos
(C++11)(C++11)(C++11)
Transformaciones de tipos
(C++11)
(C++11)
(C++17)
(C++11)(hasta C++20)(C++17)
 
std::numeric_limits
 
static constexpr int max_digits10
(desde C++11)
El valor de std::numeric_limits<T>::max_digits10 es el número de 10 dígitos de base que son necesarias para representar únicamente todos los valores distintos de la T tipo, tales como necesario para la serialización / deserialización al texto. Esta constante es significativa para todos los tipos de punto flotante .
Original:
The value of std::numeric_limits<T>::max_digits10 is the number of base-10 digits that are necessary to uniquely represent all distinct values of the type T, such as necessary for serialization/deserialization to text. This constant is meaningful for all 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.

[editar] Especializaciones estándar

T
valor de std::numeric_limits<T>::max_digits10
Original:
value of std::numeric_limits<T>::max_digits10
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
/* non-specialized */ 0
bool 0
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 std::floor(std::numeric_limits<float>::digits * std::log10(2) + 2)
double std::floor(std::numeric_limits<double>::digits * std::log10(2) + 2)
long double std::floor(std::numeric_limits<long double>::digits * std::log10(2) + 2)

[editar] Notas

A diferencia de la mayoría de las operaciones matemáticas, la conversión de un valor de punto flotante en texto y en la espalda es exacta, siempre y cuando al menos max_digits10 fueron utilizados (9 para float, 17 para double): está garantizado para producir la misma flotante valor de punto, a pesar de que la representación de texto intermedio no es exacto. Se puede tomar más de un centenar de dígitos decimales para representar el valor exacto de una float en notación decimal .
Original:
Unlike most mathematical operations, the conversion of a floating-point value to text and back is exact as long as at least max_digits10 were used (9 for float, 17 for double): it is guaranteed to produce the same floating-point value, even though the intermediate text representation is not exact. It may take over a hundred decimal digits to represent the precise value of a float in decimal notation.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Ver también

[estático]
la raíz o base entero utilizado por la representación del tipo dado
Original:
the radix or integer base used by the representation 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.

(constante miembro pública estática) [editar]
[estático]
número de dígitos radix que pueden ser representadas sin cambio
Original:
number of radix digits that can be represented without change
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante miembro pública estática) [editar]
[estático]
número de dígitos decimales que pueden ser representadas sin cambio
Original:
number of decimal digits that can be represented without change
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante miembro pública estática) [editar]
[estático]
más que la menor potencia negativa de la base de que es un válido punto flotante normalizado valor uno
Original:
one more than the smallest negative power of the radix that is a valid normalized floating-point value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante miembro pública estática) [editar]
[estático]
mayor que la máxima potencia entera de la base de que es válida finito valor de punto flotante uno
Original:
one more than the largest integer power of the radix that is a valid finite floating-point value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(constante miembro pública estática) [editar]