std::remquo
提供: cppreference.com
![]() |
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
ヘッダ <cmath> で定義
|
||
float remquo( float x, float y, int *quo ); |
(1) | (C++11以上) |
double remquo( double x, double y, int *quo ); |
(2) | (C++11以上) |
long double remquo( long double x, long double y, int *quo ); |
(3) | (C++11以上) |
Promoted remquo( Arithmetic x, Arithmetic y, int *quo ); |
(4) | (C++11以上) |
いくつかのビットを格納する値がx/y関数が行うように、浮動小数点除算演算
4) remainder
の余りを計算します。また、記号とx/yの最後のビットのうちの少なくとも3がquo.Original:
Computes the remainder of the floating point division operation x/y as the
remainder
function does. Additionally, the sign and at least the three of the last bits of x/y will be stored in quo.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.
いずれかの引数が整数型を持つ場合、それはdoubleにキャストされます。他の引数はlong doubleあれば、戻り値の型はlong double、それ以外の場合はdoubleです
Original:
If any argument has integral type, it is cast to double. If any other argument is long double, then the return type is long double, otherwise it is double
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.
目次 |
パラメータ
x, y | - | 浮動小数点値
Original: floating point values The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
quo | - | 整数へのポインタのx/yインチ
Original: pointer to an integer value to store some bits of x/y in The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
値を返します
割っ残りの引数
Original:
remainder of dividing arguments
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.
ノート
、非常に大規模な
sin(πx)
ためx
を計算するとき、std::sinを直接呼び出す方法は大きな誤差になる場合がありますが、関数の引数は、最初std::remquo
で還元されている場合:この関数は、浮動小数点値として正確に表現周期で周期関数を実装する際に便利です商の下位ビットは符号を決定するために使用することができ、残りは高精度で値を計算するために使用されるかもしれません.Original:
This function is useful when implementing periodic functions with the period exactly representable as a floating-point value: when calculating
sin(πx)
for a very large x
, calling std::sin directly may result in a large error, but if the function argument is first reduced with std::remquo
, the low-order bits of the quotient may be used to determine the sign and the remainder may be used to calculate the value with high precision.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.
も参照してください
(C++11)(C++11)(C++11) |
除算の符号付きの余りを計算します (関数) |
(C++11)(C++11) |
浮動小数点除算の余りを計算します (関数) |
(C++11) |
整数除算の商と余りを計算します (関数) |