Type-generic math
提供: cppreference.com
![]() |
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
ヘッダ
<tgmath.h>
はヘッダー<math.h>
と<complex.h>
が含まれており、いくつかの型総称マクロを定義しています。これらのマクロは、パラメータの種類に応じて呼び出すことが実際の関数を決定.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.
[編集] 三角関数、双曲線、電力や指数関数NJ
型汎用マクロ
XXX
いずれかの呼び出します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.
- 実関数: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バリアント
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バリアント
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バリアント
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.
-
- 複素関数: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バリアント
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バリアント
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バリアント
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.
-
上記ルールの例外は、(下記の表を参照)
exp
です.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.
呼び出す関数は次のように決定されます
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.
- いずれかのパラメータが複雑な場合、複雑な関数が実関数が呼び出され、それ以外の場合は呼ばれて.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. - いずれかのパラメータがlong doubleであれば、long doubleバリアントが呼び出されます。いずれかのパラメータがdoubleあればそうでない場合は、次にdoubleバリアントが呼び出されます。それ以外の場合は、floatバリアントが呼び出されます.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. - 動作は未定義である関数の対応する引数と互換性のないパラメータのいずれかをされています。
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.
型汎用マクロは次のとおりです
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 |
[編集] その他の関数NJ
型汎用マクロ
XXX
は実関数のバリアントのいずれかを呼び出します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バリアント
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バリアント
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バリアント
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.
注意、何
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.
呼び出す関数は次のように決定されます
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.
- いずれかのパラメータがlong doubleであれば、long doubleバリアントが呼び出されます。いずれかのパラメータがdoubleあればそうでない場合は、次にdoubleバリアントが呼び出されます。それ以外の場合は、floatバリアントが呼び出されます.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. - 動作は未定義である関数の対応する引数と互換性のないパラメータのいずれかをされています。
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.