◐ Shell
clean mode source ↗

MATH_ERRNO, MATH_ERREXCEPT, math_errhandling - cppreference.com

Da cppreference.com.

Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.

La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui.

Click here for the English version of this page

<metanoindex/>

<tbody> </tbody>

Elemento definito nell'header

<cmath>

#define MATH_ERRNO 1

(dal C++11)

#define MATH_ERREXCEPT 2

(dal C++11)

#define math_errhandling /*implementation defined*/

(dal C++11)

Il math_errhandling macro costante espande un'espressione di tipo int che è o uguale MATH_ERRNO, o uguale a MATH_ERREXCEPT, o pari alla loro OR bit a bit (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.

Il valore math_errhandling indica il tipo di gestione degli errori che è eseguita dai virgola mobile operatori e funzioni:

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.

Constant

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 che eccezioni a virgola mobile vengono utilizzati: almeno FE_DIVBYZERO, FE_INVALID e FE_OVERFLOW sono definiti in <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 che le operazioni in virgola mobile utilizzare il errno variabile per segnalare errori .

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.

I seguenti virgola mobile condizioni di errore sono riconosciuti:

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.

Error Domain # (argomento di input è compreso nell'intervallo in cui l'operazione è matematicamente definita, ad esempio std::sqrt(-1), std::log(-1), o std::acos(2)). Se il bit è impostato MATH_ERRNO, EDOM viene assegnato a errno. Se il bit è impostato MATH_ERREXCEPT, FE_INVALID viene generato.

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.

# Errore di area (il risultato matematico non può essere rappresentato come oggetto di tipo specificato, ad esempio std::atanh(-1), std::log(0.0) o std::lgamma(0.0)). Se il bit è impostato MATH_ERRNO, ERANGE viene assegnato a errno. Se il bit è impostato MATH_ERREXCEPT, FE_DIVBYZERO o FE_OVERFLOW viene generato.

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.

# Overflow (il risultato matematico è finito, ma troppo grande per essere rappresentato senza errore di arrotondamento estremo, ad esempio funzioni come std::exp con argomenti sufficientemente grandi). Se il bit è impostato MATH_ERRNO, ERANGE viene assegnato a errno. Se il bit è impostato MATH_ERREXCEPT, FE_OVERFLOW viene generato.

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.

# Underflow (il risultato matematico è diverso da zero, ma troppo piccolo per essere rappresentato senza errore di arrotondamento estrema, ad esempio, il risultato è subnormale, come in std::sin(subnormal) o per molte altre funzioni con argomenti subnormali). Se il bit è impostato MATH_ERRNO, ERANGE può essere assegnato a errno. Se il bit è impostato MATH_ERREXCEPT, FE_UNDERFLOW può essere sollevata.

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.

Esempio

Vedi anche