MATH_ERRNO, MATH_ERREXCEPT, math_errhandling
Da 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. |
Definido no cabeçalho <cmath> | ||
#define MATH_ERRNO 1 | (desde C++11) | |
#define MATH_ERREXCEPT 2 | (desde C++11) | |
#define math_errhandling /*implementation defined*/ | (desde C++11) | |
A constante
math_errhandling
macro expande para uma expressão de int tipo que, ou é igual a MATH_ERRNO
, ou igual a MATH_ERREXCEPT
, ou igual à sua bitwise OR (MATH_ERRNO | MATH_ERREXCEPT).Original:
The macro constant
math_errhandling
expands to an expression of type int that is either equal to MATH_ERRNO
, or equal to MATH_ERREXCEPT
, or equal to their bitwise OR (MATH_ERRNO | MATH_ERREXCEPT).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.
O valor de
math_errhandling
indica o tipo de tratamento de erro que é executado pelos operadores de ponto flutuante e funções:Original:
The value of
math_errhandling
indicates the type of error handling that is performed by the floating-point operators and functions: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.
Constante Original: Constant The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | Explanation |
MATH_ERREXCEPT | indica que exceções de ponto flutuante são usados: pelo menos FE_DIVBYZERO, FE_INVALID e FE_OVERFLOW são definidos em <cfenv> . Original: indicates that floating-point exceptions are used: at least FE_DIVBYZERO, FE_INVALID, and FE_OVERFLOW are defined in <cfenv>. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
MATH_ERRNO | indica que as operações de ponto flutuante usar o errno variável para reportar erros . Original: indicates that floating-point operations use the variable errno to report errors. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
As seguintes condições de ponto flutuante de erro são reconhecidas:
Original:
The following floating-point error conditions are recognized:
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.
Esta seção está incompleta Motivo: needs to be a table |
# Erro de domínio (argumento de entrada está fora da faixa em que a operação é matematicamente definido, por exemplo std::sqrt(-1), std::log(-1), ou std::acos(2)). Se o bit é definido
MATH_ERRNO
, EDOM é atribuído a errno. Se o bit é definido MATH_ERREXCEPT, FE_INVALID é levantada.Original:
# Domain error (input argument is outside the range in which the operation is mathematically defined, e.g. std::sqrt(-1), std::log(-1), or std::acos(2)). If
MATH_ERRNO
bit is set, EDOM is assigned to errno. If MATH_ERREXCEPT bit is set, FE_INVALID is raised.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.
# Erro Range (o resultado matemático não pode ser representado como o objeto do tipo especificado, por exemplo std::atanh(-1), std::log(0.0), std::lgamma(0.0) ou). Se o bit é definido MATH_ERRNO, ERANGE é atribuído a errno. Se o bit é definido MATH_ERREXCEPT, FE_DIVBYZERO ou FE_OVERFLOW é levantada.
Original:
# Range error (the mathematical result cannot be represented as the object of specified type, e.g. std::atanh(-1), std::log(0.0), or std::lgamma(0.0)). If MATH_ERRNO bit is set, ERANGE is assigned to errno. If MATH_ERREXCEPT bit is set, FE_DIVBYZERO or FE_OVERFLOW is raised.
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.
# Overflow (resultado matemático é finito, mas grande demais para ser representado, sem erro de arredondamento extrema por exemplo, funções como std::exp com argumentos suficientemente grandes). Se o bit é definido MATH_ERRNO, ERANGE é atribuído a errno. Se o bit é definido MATH_ERREXCEPT, FE_OVERFLOW é levantada.
Original:
# Overflow (the mathematical result is finite, but too big to be represented without extreme roundoff error, e.g. functions such as std::exp with sufficiently large arguments). If MATH_ERRNO bit is set, ERANGE is assigned to errno. If MATH_ERREXCEPT bit is set, FE_OVERFLOW is raised.
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.
# Underflow (o resultado matemático é diferente de zero, mas muito pequeno para ser representado sem um erro de arredondamento extrema, por exemplo, o resultado é subnormal, como em std::sin(subnormal) ou para muitas outras funções com argumentos subnormais). Se o bit é definido MATH_ERRNO, ERANGE pode ser atribuído a errno. Se o bit é definido MATH_ERREXCEPT, FE_UNDERFLOW podem ser levantadas.
Original:
# Underflow (the mathematical result is non-zero, but too small to be represented without extreme roundoff error, e.g. the result is subnormal, as in std::sin(subnormal) or for many other functions with subnormal arguments). If MATH_ERRNO bit is set, ERANGE may be assigned to errno. If MATH_ERREXCEPT bit is set, FE_UNDERFLOW may be raised.
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]Exemplo
Esta seção está incompleta Motivo: sem exemplo |
[editar]Veja também
exceções de ponto flutuante 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) | |
macro que se expande para POSIX compatível variable (variável macro) número de segmento local de erro Original: macro which expands to POSIX-compatible thread-local error number variable (variável macro) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |