Compile-time rational arithmetic
提供: cppreference.com
|
|
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
クラステンプレート
std::ratioおよび関連するテンプレートはコンパイル時有理数演算のサポートを提供します。このテンプレートの各インスタンスは、正確に任意の有限有理数を表し.Original:
The class template
std::ratio and associated templates provide compile-time rational arithmetic support. Each instantiation of this template exactly represents any finite rational number.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.
[編集] コンパイル時の分画
| Defined in header
<ratio> | |
| 正確な有理分数を表します Original: represents exact rational fraction The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
SIの比率に対応するいくつかの便利なtypedefは標準ライブラリで提供されています
Original:
Several convenience typedefs that correspond to the SI ratios are provided by the standard library:
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.
| Defined in header
<ratio> | |
| タイプ
Original: Type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
yocto
|
std::ratio<1, 1000000000000000000000000>、std::intmax_tは分母を表すことができます
Original: std::ratio<1, 1000000000000000000000000>, if std::intmax_t can represent the denominator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
zepto
|
std::ratio<1, 1000000000000000000000>、std::intmax_tは分母を表すことができます
Original: std::ratio<1, 1000000000000000000000>, if std::intmax_t can represent the denominator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
atto
|
std::ratio<1, 1000000000000000000> |
femto
|
std::ratio<1, 1000000000000000> |
pico
|
std::ratio<1, 1000000000000> |
nano
|
std::ratio<1, 1000000000> |
micro
|
std::ratio<1, 1000000> |
milli
|
std::ratio<1, 1000> |
centi
|
std::ratio<1, 100> |
deci
|
std::ratio<1, 10> |
deca
|
std::ratio<10, 1> |
hecto
|
std::ratio<100, 1> |
kilo
|
std::ratio<1000, 1> |
mega
|
std::ratio<1000000, 1> |
giga
|
std::ratio<1000000000, 1> |
tera
|
std::ratio<1000000000000, 1> |
peta
|
std::ratio<1000000000000000, 1> |
exa
|
std::ratio<1000000000000000000, 1> |
zetta
|
std::ratio<1000000000000000000000, 1>、std::intmax_tは分母を表すことができます
Original: std::ratio<1000000000000000000000, 1>, if std::intmax_t can represent the numerator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
yotta
|
std::ratio<1000000000000000000000000, 1>、std::intmax_tは分母を表すことができます
Original: std::ratio<1000000000000000000000000, 1>, if std::intmax_t can represent the numerator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[編集] コンパイル時有理数演算
コンパイル時に
ratioオブジェクトに対して算術演算を実行するいくつかのクラステンプレートは、提供されています.Original:
Several class templates, that perform arithmetic operations on
ratio objects at compile-time are provided.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.
| Defined in header
<ratio> | |
| (C++11) |
コンパイル時に2 ratioオブジェクトを追加します Original: adds two ratio objects at compile-time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
| (C++11) |
コンパイル時に2 ratioオブジェクトを減算します Original: subtracts two ratio objects at compile-time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
| (C++11) |
コンパイル時に2 ratioオブジェクトを乗算します Original: multiplies two ratio objects at compile-time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
| (C++11) |
コンパイル時に2 ratioオブジェクトを分割します Original: divides two ratio objects at compile-time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
[編集] コンパイル時の合理的な比較
コンパイル時に
ratioオブジェクトの比較操作を実行するいくつかのクラステンプレートは、提供されています.Original:
Several class templates, that perform comparison operations on
ratio objects at compile-time are provided.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.
| Defined in header
<ratio> | |
| (C++11) |
コンパイル時に平等のために2 ratioオブジェクトを比較します Original: compares two ratio objects for equality at compile-time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
| (C++11) |
コンパイル時に不平等のための2つの ratioオブジェクトを比較します Original: compares two ratio objects for inequality at compile-time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
| (C++11) |
コンパイル時に'より少ないため2 ratioオブジェクトを比較します Original: compares two ratio objects for less than at compile-time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
| (C++11) |
compares two ratio objects for less than or equal to at compile-time (クラステンプレート) |
| (C++11) |
コンパイル時に'よりも大きいために2つの ratioオブジェクトを比較します Original: compares two ratio objects for greater than at compile-time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
| (C++11) |
以上で、コンパイル時に等しいの2 ratioオブジェクトを比較します Original: compares two ratio objects for greater than or equal to at compile-time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |

