“cpp/numeric/ratio/ratio subtract”的版本间的差异
来自cppreference.com
小 (r2.7.3) (机器人添加:de, en, es, fr, it, ja, pt, ru) |
小 (Use {{lc}}. Update links. Various fixes.) |
||
第2行: | 第2行: | ||
{{cpp/title | ratio_subtract}} | {{cpp/title | ratio_subtract}} | ||
{{cpp/numeric/ratio/navbar}} | {{cpp/numeric/ratio/navbar}} | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{header | ratio}} |
− | {{ | + | {{| 1= |
template< class R1, class R2 > | template< class R1, class R2 > | ||
using ratio_subtract = /* unspecified */; | using ratio_subtract = /* unspecified */; | ||
}} | }} | ||
− | {{ | + | {{end}} |
− | {{tr|模板别名{{tt|std::ratio_subtract}}表示{{ | + | {{tr|模板别名{{tt|std::ratio_subtract}}表示{{|std::ratio}}的实例所代表的两个精确合理的分数相减的结果{{tt|R1}}和{{tt|R2}},结果一个{{|std::ratio}}例如{{tt|std::ratio<Num, Denom>}}其中{{c|1=Num == R1::num * R2::den - R2::num * R1::den}}和{{c|1=Denom == R1::den * R2::den}}.|The template alias {{tt|std::ratio_subtract}} denotes the result of subtracting two exact rational fractions represented by the {{|std::ratio}} instances {{tt|R1}} and {{tt|R2}}. The result a {{|std::ratio}} instance {{tt|std::ratio<Num, Denom>}} where {{c|1=Num == R1::num * R2::den - R2::num * R1::den}} and {{c|1=Denom == R1::den * R2::den}}.}} |
===会员类型=== | ===会员类型=== | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{hitem |{{tr| 会员类型 | Member type }}| Definition}} |
− | {{ | + | {{| {{tt|type}} | {{c|std::ratio<num, den>}}}} |
− | {{ | + | {{end}} |
===会员常数=== | ===会员常数=== | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{mem sconst | nolink=true | num |{{tr| {{c|constexpr}}类型的值{{|std::intmax_t}}等于{{tt|sign(Num) * sign(Denom) * abs(Num) / gcd(Num, Denom)}} | {{c|constexpr}} value of type {{|std::intmax_t}} equal to {{tt|sign(Num) * sign(Denom) * abs(Num) / gcd(Num, Denom)}} }}}} |
− | {{ | + | {{mem sconst | nolink=true | den |{{tr| {{c|constexpr}}类型的值{{|std::intmax_t}}等于{{tt|abs(Denom) / gcd(Num, Denom)}} | {{c|constexpr}} value of type {{|std::intmax_t}} equal to {{tt|abs(Denom) / gcd(Num, Denom)}} }}}} |
− | {{ | + | {{end}} |
===为例=== | ===为例=== |
2013年7月2日 (二) 10:26的版本
![]() |
该页由英文版维基使用谷歌翻译机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击此处。 |