Floating-point extensions part 4: supplementary functions
Les extensions en virgule flottante pour C - Partie 4: Fonctions supplémentaires, ISO/CEI TS 18661-4:2015, définit les nouveaux composants suivants pour la bibliothèque standard du C, comme recommandé par ISO/CEI/IEEE 60559:2011 (la révision actuelle de IEEE-754).
Les fonctions mathématiques supplémentaires listées ci-dessous sont intégrées dans la norme C2x.
Macros de test de fonctionnalités prédéfinies |
||
|
__STDC_IEC_60559_FUNCS__
|
constante entière de type
long
et de valeur
201506L
(constante macro) |
|
Fonctions mathématiques supplémentaires |
||
|
Défini dans l'en-tête
<math.h>
|
||
|
calcule
2
x
-1 (fonction) |
||
|
(FP Ext 4 TS)
|
calcule
10
x
(fonction) |
|
|
calcule
10
x
-1 (fonction) |
||
|
(FP Ext 4 TS)
|
calcule ln(1+x) (identique à
log1p
)
(fonction) |
|
|
calcule
log
2
(1+x)
(fonction) |
||
|
calcule
log
10
(1+x)
(fonction) |
||
|
(FP Ext 4 TS)
|
calcule la racine carrée inverse
x
-1/2
(fonction) |
|
|
calcule l'intérêt composé,
(1+x)
n
(fonction) |
||
|
(FP Ext 4 TS)
|
calcule la racine n-ième de x,
x
1/n
(fonction) |
|
|
(FP Ext 4 TS)
|
calcule x élevé à la puissance n, où n est un entier
(fonction) |
|
|
(FP Ext 4 TS)
|
calcule x élevé à la puissance y,
x
y
(fonction) |
|
|
calcule arccos(x)/π (mesurant l'angle en demi-révolutions)
(fonction) |
||
|
calcule arcsin(x)/π (mesurant l'angle en demi-révolutions)
(fonction) |
||
|
calcule arctan(x)/π (mesurant l'angle en demi-révolutions)
(fonction) |
||
|
calcule arctan(y/x)/π (mesurant l'angle en demi-révolutions)
(fonction) |
||
|
(FP Ext 4 TS)
|
calcule cos(πx) (mesurant l'angle en demi-révolutions)
(fonction) |
|
|
(FP Ext 4 TS)
|
calcule sin(πx) (mesurant l'angle en demi-révolutions)
(fonction) |
|
|
(FP Ext 4 TS)
|
calcule tan(πx) (mesure l'angle en demi-révolutions)
(fonction) |
|
Fonctions de réduction |
||
|
Défini dans l'en-tête
<math.h>
|
||
|
calcule la somme de n éléments d'un tableau
(fonction) |
||
|
calcule la somme des valeurs absolues de n éléments d'un tableau
(fonction) |
||
|
calcule la somme des carrés de n éléments d'un tableau
(fonction) |
||
|
calcule le produit scalaire entre n éléments de deux tableaux
(fonction) |
||
|
calcule le produit de n éléments d'un tableau comme une valeur mise à l'échelle et un facteur d'échelle
(fonction) |
||
|
calcule le produit scalaire de n éléments de deux tableaux comme une valeur mise à l'échelle et un facteur d'échelle
(fonction) |
||
|
calcule le produit des différences entre les n membres correspondants de deux tableaux sous forme de valeur mise à l'échelle et d'un facteur d'échelle
(fonction) |
||
Version correctement arrondie des fonctions |
||
|
Défini dans l'en-tête
<math.h>
|
||
|
crexp
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
exp
(fonction) |
|
|
crexpm1
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
expm1
(fonction) |
|
|
crexp2
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
exp2
(fonction) |
|
|
crexp2m1
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
exp2m1
(fonction) |
|
|
crexp10
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
exp10
(fonction) |
|
|
crexp10m1
(optionnel)
(FP Ext 4 TS)
|
version arrondie correctement de
exp10m1
(fonction) |
|
|
crlog
(optionnel)
(FP Ext 4 TS)
|
version arrondie correctement de
log
(fonction) |
|
|
crlog2
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
log2
(fonction) |
|
|
crlog10
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
log10
(fonction) |
|
|
crlog1p
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
log1p
(fonction) |
|
|
crlogp1
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
logp1
(fonction) |
|
|
crlog2p1
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
log2p1
(fonction) |
|
|
crlog10p1
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
log10p1
(fonction) |
|
|
crrsqrt
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
rsqrt
(fonction) |
|
|
crcompoundn
(optionnel)
(FP Ext 4 TS)
|
version arrondie correctement de
compoundn
(fonction) |
|
|
crrootn
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
rootn
(fonction) |
|
|
crpown
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
pown
(fonction) |
|
|
crpow
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
pow
(fonction) |
|
|
crpowr
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
powr
(fonction) |
|
|
crsin
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
sin
(fonction) |
|
|
crcos
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
cos
(fonction) |
|
|
crtan
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
tan
(fonction) |
|
|
crsinpi
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
sinpi
(fonction) |
|
|
crcospi
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
cospi
(fonction) |
|
|
crtanpi
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
tanpi
(fonction) |
|
|
crasinpi
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
asinpi
(fonction) |
|
|
cracospi
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
acospi
(fonction) |
|
|
cracospi
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
acospi
(fonction) |
|
|
cratanpi
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
atanpi
(fonction) |
|
|
cratan2pi
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
atan2pi
(fonction) |
|
|
crasin
(optionnel)
(FP Ext 4 TS)
|
version à arrondi correct de
asin
(fonction) |
|
|
cracos
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
acos
(fonction) |
|
|
cratan
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
atan
(fonction) |
|
|
cratan2
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
atan2
(fonction) |
|
|
crsinh
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
sinh
(fonction) |
|
|
crcosh
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
cosh
(fonction) |
|
|
crtanh
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
tanh
(fonction) |
|
|
crasinh
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
asinh
(fonction) |
|
|
cracosh
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
acosh
(fonction) |
|
|
cratanh
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
atanh
(fonction) |
|
|
crhypot
(optionnel)
(FP Ext 4 TS)
|
version correctement arrondie de
hypot
(fonction) |
|
Version complexe des fonctions |
||
|
Défini dans l'en-tête
<complex.h>
|
||
|
cexp2m1
(optionnel)
(FP Ext 4 TS)
|
version nombre complexe de
exp2m1
(fonction) |
|
|
cexp10
(optionnel)
(FP Ext 4 TS)
|
version nombre complexe de
exp10
(fonction) |
|
|
cexp10m1
(optionnel)
(FP Ext 4 TS)
|
version nombre complexe de
exp10m1
(fonction) |
|
|
clogp1
(optionnel)
(FP Ext 4 TS)
|
version nombre complexe de
logp1
(fonction) |
|
|
clog2p1
(optionnel)
(FP Ext 4 TS)
|
version pour nombres complexes de
log2p1
(fonction) |
|
|
clog10p1
(optionnel)
(FP Ext 4 TS)
|
version nombre complexe de
log10p1
(fonction) |
|
|
crsqrt
(optionnel)
(FP Ext 4 TS)
|
version nombre complexe de
rsqrt
(fonction) |
|
|
ccompoundn
(optionnel)
(FP Ext 4 TS)
|
version complexe de
compoundn
(fonction) |
|
|
crootn
(optionnel)
(FP Ext 4 TS)
|
version complexe de
rootn
(fonction) |
|
|
cpown
(optionnel)
(FP Ext 4 TS)
|
version complexe de
pown
(fonction) |
|
|
cpowr
(optionnel)
(FP Ext 4 TS)
|
version nombre complexe de
powr
(fonction) |
|
|
cacospi
(optionnel)
(FP Ext 4 TS)
|
version complexe de
acospi
(fonction) |
|
|
casinpi
(optionnel)
(FP Ext 4 TS)
|
version nombre complexe de
asinpi
(fonction) |
|
|
catanpi
(optionnel)
(FP Ext 4 TS)
|
version nombre complexe de
atanpi
(fonction) |
|
|
ccospi
(optionnel)
(FP Ext 4 TS)
|
version nombre complexe de
cospi
(fonction) |
|
|
csinpi
(optionnel)
(FP Ext 4 TS)
|
version nombre complexe de
sinpi
(fonction) |
|
|
ctanpi
(optionnel)
(FP Ext 4 TS)
|
version nombre complexe de
tanpi
(fonction) |
|
Notes
Toutes les fonctions ajoutées à la bibliothèque C par cette extension ne sont déclarées que si une macro __STDC_WANT_IEC_60559_FUNCS_EXT__ est définie avant l'inclusion de math.h.
Les variantes en virgule flottante décimales de chaque fonction ne sont définies que si __STDC_WANT_IEC_60559_DFP_EXT__ est également défini avant l'inclusion de math.h.
Les variantes en précision étendue de chaque fonction ne sont définies que si __STDC_WANT_IEC_60559_TYPES_EXT__ est défini avant l'inclusion de math.h.
Les versions correctement arrondies de toutes les fonctions (avec le préfixe cr - ) sont optionnelles.