Type-generic math
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. |
Il
<tgmath.h>
intestazione include le intestazioni <math.h>
e <complex.h>
e definisce diversi tipo generici macro. Queste macro determina l'effettiva funzione di chiamare a seconda dei tipi dei parametri.Original:
The header
<tgmath.h>
includes the headers <math.h>
and <complex.h>
and defines several type-generic macros. These macros determines the actual function to call depending on the types of the parameters.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.
[modifica] Trigonometriche, iperboliche, potenza e funzioni esponenziali NJ
Un tipo generico
XXX
macro chiama uno dei:Original:
A type-generic macro
XXX
calls either of: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.
- vera e propria funzione:Original:real function:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- float variante
XXXf
Original:float variantXXXf
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - double variante
XXX
Original:double variantXXX
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - long double variante
XXXl
Original:long double variantXXXl
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
-
- complessa funzione:Original:complex function:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- float variante
cXXXf
Original:float variantcXXXf
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - double variante
cXXX
Original:double variantcXXX
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - long double variante
cXXXl
Original:long double variantcXXXl
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
-
Una eccezione alla regola di cui sopra è
exp
(vedere la tabella qui sotto).Original:
An exception to the above rule is
exp
(see the table below).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.
La funzione da chiamare è determinato come segue:
Original:
The function to call is determined as follows:
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.
- Se uno qualsiasi dei parametri è complessa, quindi la complessa funzione viene chiamata, altrimenti la funzione reale viene chiamata.Original:If any of the parameters is complex, then the complex function is called, otherwise the real function is called.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - Se uno qualsiasi dei parametri è long double, allora la variante long double viene chiamato. Altrimenti, se uno qualsiasi dei parametri è double, allora la variante double viene chiamato. In caso contrario, variante float si chiama.Original:If any of the parameters is long double, then the long double variant is called. Otherwise, if any of the parameters is double, then the double variant is called. Otherwise, float variant is called.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - Il comportamento è indefinito è uno dei parametri è incompatibile con il corrispondente argomento della funzione.
This section is incomplete
Reason: what's meant by incompatible?Original:The behavior is undefined is any of the parameters is incompatible with the corresponding argument of the function.This section is incomplete
Reason: what's meant by incompatible?The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Il tipo generico macro sono i seguenti:
Original:
The type-generic macros are as follows:
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.
Type-generic macro | Real function variants |
Complex function variants | ||||
---|---|---|---|---|---|---|
float |
double |
long double |
float |
double |
long double | |
asin | asinf | asin | asinl | casinf | casin | casinl |
acos | acosf | acos | acosl | cacosf | cacos | cacosl |
atan | atanf | atan | atanl | catanf | catan | catanl |
asinh | asinhf | asinh | asinhl | casinhf | casinh | casinhl |
acosh | acoshf | acosh | acoshl | cacoshf | cacosh | cacoshl |
atanh | atanhf | atanh | atanhl | catanhf | catanh | catanhl |
sin | sinf | sin | sinl | csinf | csin | csinl |
cos | cosf | cos | cosl | ccosf | ccos | ccosl |
tan | tanf | tan | tanl | ctanf | ctan | ctanl |
sinh | sinhf | sinh | sinhl | csinhf | csinh | csinhl |
cosh | coshf | cosh | coshl | ccoshf | ccosh | ccoshl |
tanh | tanhf | tanh | tanhl | ctanhf | ctanh | ctanhl |
exp | expf | exp | expl | cexpf | cexp | cexpl |
log | logf | log | logl | clogf | clog | clogl |
pow | powf | pow | powl | cpowf | cpow | cpowl |
sqrt | sqrtf | sqrt | sqrtl | csqrtf | csqrt | csqrtl |
abs | fabsf | fabs | fabsl | cabsf | cabs | cabsl |
exp | expf | exp | expl | cexpf | cexp | cexpl |
[modifica] Varie funzioni NJ
Un tipo generico
XXX
macro chiama una delle due varianti di una funzione reale:Original:
A type-generic macro
XXX
calls either of the variants of a real function: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.
- float variante
XXXf
Original:float variantXXXf
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - double variante
XXX
Original:double variantXXX
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - long double variante
XXXl
Original:long double variantXXXl
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Nota, non c'è alcun tipo di macro-generic
modf
.Original:
Note, there's no
modf
type-generic macro.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.
La funzione da chiamare è determinato come segue:
Original:
The function to call is determined as follows:
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.
- Se uno qualsiasi dei parametri è long double, allora la variante long double viene chiamato. Altrimenti, se uno qualsiasi dei parametri è double, allora la variante double viene chiamato. In caso contrario, variante float si chiama.Original:If any of the parameters is long double, then the long double variant is called. Otherwise, if any of the parameters is double, then the double variant is called. Otherwise, float variant is called.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - Il comportamento è indefinito è uno dei parametri è incompatibile con il corrispondente argomento della funzione.
This section is incomplete
Reason: what's meant by incompatible?Original:The behavior is undefined is any of the parameters is incompatible with the corresponding argument of the function.This section is incomplete
Reason: what's meant by incompatible?The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.