Espacios de nombres
Variantes
Acciones

Floating-point environment

De cppreference.com
< cpp‎ | numeric

 
 
Numéricos biblioteca
Funciones matemáticas comunes
Floating-point medio ambiente
Los números complejos
Matrices numéricas
Pseudo-aleatoria de generación de números
En tiempo de compilación aritmética racional (C++11)
Genéricos operaciones numéricas
Original:
Generic numeric operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iota(C++11)
accumulate
inner_product
adjacent_difference
partial_sum
 
Floating-point medio ambiente
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.
feclearexcept(C++11)
fetestexcept(C++11)
feraiseexcept(C++11)
fegetexceptflag
fesetexceptflag
(C++11)
(C++11)
fegetround
fesetround
(C++11)
(C++11)
fegetenv
fesetenv
(C++11)
feholdexcept(C++11)
feupdateenv(C++11)
Constantes Macro
Original:
Macro constants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
FE_ALL_EXCEPT
FE_DIVBYZERO
FE_INEXACT
FE_INVALID
FE_OVERFLOW
FE_UNDERFLOW
(C++11)
FE_DOWNWARD
FE_TONEAREST
FE_TOWARDZERO
FE_UPWARD
(C++11)
FE_DFL_ENV(C++11)
 
El entorno de punto flotante es el conjunto de indicadores de estado de coma flotante y modos de control soportados por la implementación. Es subproceso local, cada hilo hereda el estado inicial de su entorno de punto flotante de la rosca padre. Operaciones de punto flotante modificar los indicadores de estado de coma flotante para indicar los resultados anormales o información auxiliar. El estado de los modos de control de punto flotante afecta a los resultados de algunas operaciones de punto flotante .
Original:
The floating-point environment is the set of floating-point status flags and control modes supported by the implementation. It is thread-local, each thread inherits the initial state of its floating-point environment from the parent thread. Floating-point operations modify the floating-point status flags to indicate abnormal results or auxiliary information. The state of floating-point control modes affects the outcomes of some floating-point operations.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
El acceso a las instalaciones de punto flotante y la modificación sólo tiene sentido cuando se establece #pragma STDC FENV_ACCESS ON. De lo contrario la aplicación es libre de asumir que coma flotante modos de control son siempre los que vienen por defecto y que los indicadores de estado de coma flotante nunca se han comprobado o modificado. En la práctica, son pocos los compiladores actuales apoyan la #pragma explícitamente, pero la mayoría de los compiladores permiten un acceso significativo al medio ambiente de punto flotante de todos modos .
Original:
The floating-point environment access and modification is only meaningful when #pragma STDC FENV_ACCESS is set to ON. Otherwise the implementation is free to assume that floating-point control modes are always the default ones and that floating-point status flags are never tested or modified. In practice, few current compilers support the #pragma explicitly, but most compilers allow meaningful access to the floating-point environment anyway.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Contenido

[editar] Tipos

Defined in header <cfenv>
fenv_t
El tipo de representación de la totalidad de punto flotante ambiente
Original:
The type representing the entire floating-point environment
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
fexcept_t
El tipo de representación de todos los indicadores de estado de coma flotante de forma colectiva
Original:
The type representing all floating-point status flags collectively
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Funciones

borra los especificados en coma flotante indicadores de estado
Original:
clears the specified floating-point status flags
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función) [edit]
determina cuál de los indicadores de estado de punto flotante especificado se establecen
Original:
determines which of the specified floating-point status flags are set
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función) [edit]
eleva los especificados excepciones de punto flotante
Original:
raises the specified floating-point exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función) [edit]
copia el estado de los indicadores de estado de punto flotante especificado desde o hacia el entorno de punto flotante
Original:
copies the state of the specified floating-point status flags from or to the floating-point environment
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función) [edit]
(C++11)
(C++11)
obtiene o establece la dirección redondeo
Original:
gets or sets rounding direction
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función) [edit]
guarda o restaura el entorno actual de punto flotante
Original:
saves or restores the current floating point environment
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función) [edit]
protege el medio ambiente, se borran todos los indicadores de estado y hace caso omiso de todos los errores en el futuro
Original:
saves the environment, clears all status flags and ignores all future errors
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función) [edit]
restaura el entorno de coma flotante y plantea la anteriormente lanzar excepciones
Original:
restores the floating-point environment and raises the previously raise exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función) [edit]

[editar] Macros

excepciones de punto flotante
Original:
floating-point exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(macro constante) [edit]
de punto flotante de redondeo dirección
Original:
floating-point rounding direction
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(macro constante) [edit]
defecto de punto flotante de medio ambiente
Original:
default floating-point environment
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(macro constante) [edit]

[editar] Notas

Las excepciones de punto flotante no están relacionados con las excepciones de C + +. Cuando una operación de punto flotante plantea una excepción de punto flotante, el estado de los cambios en el entorno de coma flotante, que se pueden ensayar con std::fetestexcept, pero la ejecución de un programa en C + + en la mayoría de las implementaciones continúa sin interrupción .
Original:
The floating-point exceptions are not related to the C++ exceptions. When a floating-point operation raises a floating-point exception, the status of the floating-point environment changes, which can be tested with std::fetestexcept, but the execution of a C++ program on most implementations continues uninterrupted.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Hay extensiones compilador que se pueden utilizar para generar C + + excepciones automáticamente siempre que una excepción de punto flotante se eleva:
Original:
There are compiler extensions that may be used to generate C++ exceptions automatically whenever a floating-point exception is raised:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • GNU libc feenableexcept() función permite captura de las excepciones de punto flotante, lo que genera la señal SIGFPE. Si la opción del compilador -fnon-call-exceptions se utilizó el manejador para esta señal puede lanzar una definida por el usuario C + + excepción .
    Original:
    GNU libc function feenableexcept() enables trapping of the floating-point exceptions, which generates the signal SIGFPE. If the compiler option -fnon-call-exceptions was used, the handler for that signal may throw a user-defined C++ exception.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Microsoft _control87() función WinAPI permite la captura de las excepciones de punto flotante, lo que genera una excepción de hardware, que se puede convertir en C + + excepciones con _set_se_translator .
    Original:
    Microsoft WinAPI function _control87() enables trapping of the floating-point exceptions, which generates a hardware exception, which can be converted to C++ exceptions with _set_se_translator.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.