tmp/tmp21chr_tu/{from.md → to.md}
RENAMED
|
@@ -1,22 +1,22 @@
|
|
| 1 |
### Arithmetic on `ratio`s <a id="ratio.arithmetic">[[ratio.arithmetic]]</a>
|
| 2 |
|
| 3 |
Each of the alias templates `ratio_add`, `ratio_subtract`,
|
| 4 |
`ratio_multiply`, and `ratio_divide` denotes the result of an arithmetic
|
| 5 |
computation on two `ratio`s `R1` and `R2`. With `X` and `Y` computed (in
|
| 6 |
-
the absence of arithmetic overflow) as specified by
|
| 7 |
-
[[
|
| 8 |
-
|
| 9 |
`ratio<X, Y>::den`.
|
| 10 |
|
| 11 |
If it is not possible to represent `U` or `V` with `intmax_t`, the
|
| 12 |
program is ill-formed. Otherwise, an implementation should yield correct
|
| 13 |
values of `U` and `V`. If it is not possible to represent `X` or `Y`
|
| 14 |
with `intmax_t`, the program is ill-formed unless the implementation
|
| 15 |
yields correct values of `U` and `V`.
|
| 16 |
|
| 17 |
-
**Table: Expressions used to perform ratio arithmetic** <a id="
|
| 18 |
|
| 19 |
| Type | Value of `X` | Value of `Y` |
|
| 20 |
| ------------------------ | --------------------- | ------------------- |
|
| 21 |
| `ratio_add<R1, R2>` | `R1::num * R2::den +` | `R1::den * R2::den` |
|
| 22 |
| | `R2::num * R1::den` | |
|
|
|
|
| 1 |
### Arithmetic on `ratio`s <a id="ratio.arithmetic">[[ratio.arithmetic]]</a>
|
| 2 |
|
| 3 |
Each of the alias templates `ratio_add`, `ratio_subtract`,
|
| 4 |
`ratio_multiply`, and `ratio_divide` denotes the result of an arithmetic
|
| 5 |
computation on two `ratio`s `R1` and `R2`. With `X` and `Y` computed (in
|
| 6 |
+
the absence of arithmetic overflow) as specified by
|
| 7 |
+
[[ratio.arithmetic]], each alias denotes a `ratio<U, V>` such that `U`
|
| 8 |
+
is the same as `ratio<X, Y>::num` and `V` is the same as
|
| 9 |
`ratio<X, Y>::den`.
|
| 10 |
|
| 11 |
If it is not possible to represent `U` or `V` with `intmax_t`, the
|
| 12 |
program is ill-formed. Otherwise, an implementation should yield correct
|
| 13 |
values of `U` and `V`. If it is not possible to represent `X` or `Y`
|
| 14 |
with `intmax_t`, the program is ill-formed unless the implementation
|
| 15 |
yields correct values of `U` and `V`.
|
| 16 |
|
| 17 |
+
**Table: Expressions used to perform ratio arithmetic** <a id="ratio.arithmetic">[ratio.arithmetic]</a>
|
| 18 |
|
| 19 |
| Type | Value of `X` | Value of `Y` |
|
| 20 |
| ------------------------ | --------------------- | ------------------- |
|
| 21 |
| `ratio_add<R1, R2>` | `R1::num * R2::den +` | `R1::den * R2::den` |
|
| 22 |
| | `R2::num * R1::den` | |
|