Espacios de nombres
Variantes
Acciones

floating point literal

De cppreference.com
< cpp‎ | language

 
 
Lenguaje C++
Los temas generales
Original:
General topics
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Control de flujo
Original:
Flow control
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Sentencias condicionales ejecución
Original:
Conditional execution statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Instrucciones de iteración
Original:
Iteration statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Ir declaraciones
Original:
Jump statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funciones
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
declaración de la función
lambda declaración de la función
función de plantilla
especificador inline
especificaciones de excepción (obsoleto)
noexcept especificador (C++11)
Excepciones
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Los espacios de nombres
Original:
Namespaces
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tipos
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
decltype specifier (C++11)
Los especificadores
Original:
Specifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
cv especificadores
almacenamiento duración especificadores
constexpr especificador (C++11)
auto especificador (C++11)
alignas especificador (C++11)
Inicialización
Original:
Initialization
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Los literales
Original:
Literals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Expresiones
Original:
Expressions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
representaciones alternativas
Utilidades
Original:
Utilities
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tipos
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
typedef declaration
alias de tipo de declaración (C++11)
atributos (C++11)
Lanza
Original:
Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
conversiones implícitas
const_cast conversion
static_cast conversion
dynamic_cast conversion
reinterpret_cast conversion
C-cast estilo y funcional
De asignación de memoria
Original:
Memory allocation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Clases
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Clase propiedades específicas de la función
Original:
Class-specific function properties
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funciones especiales miembro
Original:
Special member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Plantillas
Original:
Templates
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
clase de plantilla
función de plantilla
plantilla de especialización
paquetes de parámetros (C++11)
Varios
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Montaje en línea
 
Punto flotante literal define una constante en tiempo de compilación, cuyo valor se especifica en el archivo de origen .
Original:
Floating point literal defines a compile-time constant whose value is specified in the source file.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Sintaxis

A literales de punto flotante tiene dos sintaxis. La primera consiste en las siguientes partes:
Original:
A floating-point literals have two syntaxes. The first one consists of the following parts:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • no vacío secuencia de dígitos decimales que contienen un carácter de punto decimal (define significativa)
    Original:
    nonempty sequence of decimal digits containing a decimal point character (defines significant)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (opcional) e o E seguido con menos opcionales o signo más y la secuencia no vacía de dígitos decimales (define exponente)
    Original:
    (opcional) e or E followed with optional minus or plus sign and nonempty sequence of decimal digits (defines exponent)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (opcional) un especificador de tipo sufijo como l, f, L o F
    Original:
    (opcional) a suffix type specifier as a l, f, L or F
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
El segundo consiste de las siguientes partes:
Original:
The second one consists of the following parts:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • no vacío secuencia de dígitos decimales (define significativa)
    Original:
    nonempty sequence of decimal digits (defines significant)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • e o E seguido con menos opcionales o signo más y la secuencia no vacía de dígitos decimales (define exponente)
    Original:
    e or E followed with optional minus or plus sign and nonempty sequence of decimal digits (defines exponent)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (opcional) un especificador de tipo sufijo como l, f, L o F
    Original:
    (opcional) a suffix type specifier as a l, f, L or F
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
El tipo define el sufijo especificador de tipo real del literal de punto flotante:
Original:
The suffix type specifier defines the actual type of the floating-point literal:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • (Sin sufijo) define double
    Original:
    (no suffix) defines double
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • f F define float
    Original:
    f F defines float
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • l L define long double
    Original:
    l L defines long double
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

[editar] Explicación

Una notación científica decimal se utiliza, lo que significa que el exponente es la potencia de 10 por el que es importante multiplied.
Original:
A decimal scientific notation is used, meaning that the exponent is the power of 10 by which the significant is multiplied.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
El significado matemático de 123e4 es 123 × 10 4 </ sup>
Original:
The mathematical meaning of 123e4 is 123×104
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
</div>

[editar] Ejemplo

std::cout << 123.456e-67 << '\n'
          << .1E4f       << '\n'
          << 58.         << '\n'
          << 4e2         << '\n';

Output:

1.23456e-65
1000
58
400