floating point literal
De cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
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.
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.
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)
eoEseguido con menos opcionales o signo más y la secuencia no vacía de dígitos decimales (define exponente)Original:(opcional)eorEfollowed 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,LoFOriginal:(opcional) a suffix type specifier as al,f,LorFThe 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.
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. -
eoEseguido con menos opcionales o signo más y la secuencia no vacía de dígitos decimales (define exponente)Original:eorEfollowed 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,LoFOriginal:(opcional) a suffix type specifier as al,f,LorFThe 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.
You can help to correct and verify the translation. Click here for instructions.
- (Sin sufijo) define doubleOriginal:(no suffix) defines doubleThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. -
f Fdefine floatOriginal:f Fdefines floatThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. -
l Ldefine long doubleOriginal:l Ldefines long doubleThe 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.
You can help to correct and verify the translation. Click here for instructions.
El significado matemático de 123e4 es 123 × 10 4 </ sup></div>
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.
You can help to correct and verify the translation. Click here for instructions.
[editar] Ejemplo
std::cout << 123.456e-67 << '\n' << .1E4f << '\n' << 58. << '\n' << 4e2 << '\n';
Output:
1.23456e-65 1000 58 400