Standard library header <fenv.h> (C99)
From cppreference.net
Cet en-tête fait partie de la bibliothèque d'environnement en virgule flottante .
Table des matières |
Types
|
Défini dans l'en-tête
<fenv.h>
|
|
| fenv_t | Le type représentant l'environnement complet en virgule flottante |
| fexcept_t | Le type représentant collectivement tous les indicateurs d'état en virgule flottante |
Fonctions
|
(C99)
|
efface les indicateurs d'état en virgule flottante spécifiés
(fonction) |
|
(C99)
|
détermine quels indicateurs d'état en virgule flottante spécifiés sont activés
(fonction) |
|
(C99)
|
déclenche les exceptions en virgule flottante spécifiées
(fonction) |
|
(C99)
(C99)
|
copie l'état des indicateurs d'état en virgule flottante spécifiés depuis ou vers l'environnement en virgule flottante
(fonction) |
|
(C99)
(C99)
|
obtient ou définit la direction d'arrondi
(fonction) |
|
(C99)
|
sauvegarde ou restaure l'environnement en virgule flottante actuel
(fonction) |
|
(C99)
|
sauvegarde l'environnement, efface tous les indicateurs d'état et ignore toutes les erreurs futures
(fonction) |
|
(C99)
|
restaure l'environnement en virgule flottante et déclenche les exceptions précédemment déclenchées
(fonction) |
Macros
|
exceptions en virgule flottante
(constante macro) |
|
|
direction d'arrondi en virgule flottante
(constante macro) |
|
|
(C99)
|
environnement en virgule flottante par défaut
(constante macro) |
Synopsis
#define __STDC_VERSION_FENV_H__ 202311L #define FE_ALL_EXCEPT /* voir description */ #define FE_DIVBYZERO /* voir description */ #define FE_INEXACT /* voir description */ #define FE_INVALID /* voir description */ #define FE_OVERFLOW /* voir description */ #define FE_UNDERFLOW /* voir description */ #define FE_DOWNWARD /* voir description */ #define FE_TONEARESTFROMZERO /* voir description */ #define FE_TONEAREST /* voir description */ #define FE_TOWARDZERO /* voir description */ #define FE_UPWARD /* voir description */ #define FE_DFL_ENV /* voir description */ #define FE_DFL_MODE /* voir description */ #define fenv_t /* voir description */ #define fexcept_t /* voir description */ #define femode_t /* voir description */ #pragma STDC FENV_ACCESS /*commutateur activation-désactivation*/ #pragma STDC FENV_ROUND direction #pragma STDC FENV_ROUND FE_DYNAMIC // fonctions int feclearexcept(int excepts); int fegetexceptflag(fexcept_t* flagp, int excepts); int feraiseexcept(int excepts); int fesetexcept(int excepts); int fesetexceptflag(const fexcept_t* flagp, int excepts); int fetestexceptflag(const fexcept_t* flagp, int excepts); int fetestexcept(int excepts); int fegetmode(femode_t* modep); int fegetround(void); int fesetmode(const femode_t* modep); int fesetround(int rnd); int fegetenv(fenv_t* envp); int feholdexcept(fenv_t* envp); int fesetenv(const fenv_t* envp); int feupdateenv(const fenv_t* envp); // Uniquement si l'implémentation définit __STDC_IEC_60559_DFP__ : #define FE_DEC_DOWNWARD /* défini par l'implémentation */ #define FE_DEC_TONEARESTFROMZERO /* défini par l'implémentation */ #define FE_DEC_TONEAREST /* défini par l'implémentation */ #define FE_DEC_TOWARDZERO /* défini par l'implémentation */ #define FE_DEC_UPWARD /* défini par l'implémentation */ #pragma STDC FENV_DEC_ROUND /*direction-décimale*/ int fe_dec_getround(void); int fe_dec_setround(int rnd); // Uniquement si l'implémentation suit la pratique recommandée de F.2.2 : #define FE_SNANS_ALWAYS_SIGNAL /* défini par l'implémentation */