tmp/tmp3n_2wwhz/{from.md → to.md}
RENAMED
|
@@ -1,10 +1,9 @@
|
|
| 1 |
### Absolute values <a id="c.math.abs">[[c.math.abs]]</a>
|
| 2 |
|
| 3 |
-
[*Note 1*: The headers `<cstdlib>`
|
| 4 |
-
|
| 5 |
-
subclause. — *end note*]
|
| 6 |
|
| 7 |
``` cpp
|
| 8 |
int abs(int j);
|
| 9 |
long int abs(long int j);
|
| 10 |
long long int abs(long long int j);
|
|
@@ -17,12 +16,12 @@ long double abs(long double j);
|
|
| 17 |
standard library for the functions `abs`, `labs`, `llabs`, `fabsf`,
|
| 18 |
`fabs`, and `fabsl`.
|
| 19 |
|
| 20 |
*Remarks:* If `abs()` is called with an argument of type `X` for which
|
| 21 |
`is_unsigned_v<X>` is `true` and if `X` cannot be converted to `int` by
|
| 22 |
-
integral promotion
|
| 23 |
|
| 24 |
[*Note 1*: Arguments that can be promoted to `int` are permitted for
|
| 25 |
compatibility with C. — *end note*]
|
| 26 |
|
| 27 |
-
ISO C 7.12.7.2, 7.22.6.1
|
| 28 |
|
|
|
|
| 1 |
### Absolute values <a id="c.math.abs">[[c.math.abs]]</a>
|
| 2 |
|
| 3 |
+
[*Note 1*: The headers `<cstdlib>` and `<cmath>` declare the functions
|
| 4 |
+
described in this subclause. — *end note*]
|
|
|
|
| 5 |
|
| 6 |
``` cpp
|
| 7 |
int abs(int j);
|
| 8 |
long int abs(long int j);
|
| 9 |
long long int abs(long long int j);
|
|
|
|
| 16 |
standard library for the functions `abs`, `labs`, `llabs`, `fabsf`,
|
| 17 |
`fabs`, and `fabsl`.
|
| 18 |
|
| 19 |
*Remarks:* If `abs()` is called with an argument of type `X` for which
|
| 20 |
`is_unsigned_v<X>` is `true` and if `X` cannot be converted to `int` by
|
| 21 |
+
integral promotion [[conv.prom]], the program is ill-formed.
|
| 22 |
|
| 23 |
[*Note 1*: Arguments that can be promoted to `int` are permitted for
|
| 24 |
compatibility with C. — *end note*]
|
| 25 |
|
| 26 |
+
See also: ISO C 7.12.7.2, 7.22.6.1
|
| 27 |
|