Compile-time rational arithmetic

来自cppreference.com

 
 
Numerics的图书馆
常见的数学函数
浮点环境
复数
数字阵列
伪随机数生成
编译时合理的算法 (C++11)
通用的数值运算
Original:
Generic numeric operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iota(C++11)
accumulate
inner_product
adjacent_difference
partial_sum
 
编译时间合理的算法
ratio(C++11)
算术
Original:
Arithmetic
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ratio_add(C++11)
ratio_subtract(C++11)
ratio_multiply(C++11)
ratio_divide(C++11)
比较
Original:
Comparison
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ratio_equal(C++11)
ratio_not_equal(C++11)
ratio_less(C++11)
ratio_less_equal(C++11)
ratio_greater(C++11)
ratio_greater_equal(C++11)
 
的类模板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.

[编辑] 编译时的分数

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.

(类模板)
由标准库提供了几个方便的typedef对应的SI比例的
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.
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.
Defined in header <ratio>
(C++11)
增加了两个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.

(类模板) [edit]
(C++11)
在编译时减去两个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.

(类模板) [edit]
(C++11)
将两个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.

(类模板) [edit]
(C++11)
将两个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.

(类模板) [edit]

[编辑] 编译时的理性的比较

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.
Defined in header <ratio>
(C++11)
比较两个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.

(类模板) [edit]
(C++11)
比较两个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.

(类模板) [edit]
(C++11)
比较两个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.

(类模板) [edit]
compares two ratio objects for less than or equal to at compile-time
(类模板) [edit]
(C++11)
比较两个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.

(类模板) [edit]
比较两个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.

(类模板) [edit]