From Jason Turner

[numeric.ops.gcd]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpf6ust8bj/{from.md → to.md} +22 -0
tmp/tmpf6ust8bj/{from.md → to.md} RENAMED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Greatest common divisor <a id="numeric.ops.gcd">[[numeric.ops.gcd]]</a>
2
+
3
+ ``` cpp
4
+ template <class M, class N>
5
+ constexpr common_type_t<M,N> gcd(M m, N n);
6
+ ```
7
+
8
+ *Requires:* `|m|` and `|n|` shall be representable as a value of
9
+ `common_type_t<M, N>`.
10
+
11
+ [*Note 1*: These requirements ensure, for example, that
12
+ `gcd(m, m) = |m|` is representable as a value of type
13
+ `M`. — *end note*]
14
+
15
+ *Remarks:* If either `M` or `N` is not an integer type, or if either is
16
+ cv `bool`, the program is ill-formed.
17
+
18
+ *Returns:* Zero when `m` and `n` are both zero. Otherwise, returns the
19
+ greatest common divisor of `|m|` and `|n|`.
20
+
21
+ *Throws:* Nothing.
22
+